Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on zero tab width #6429

Merged
merged 5 commits into from
Aug 8, 2023
Merged

Conversation

tjkuson
Copy link
Contributor

@tjkuson tjkuson commented Aug 8, 2023

Summary

Error if tab-size is set to zero (it is used as a divisor). Closes #6423.

Also fixes a typo.

Test Plan

Running ruff with a config

[tool.ruff]
tab-size = 0

returns an error message to the user saying that tab-size must be greater than zero.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00      9.8±0.07ms     4.2 MB/sec    1.01      9.8±0.07ms     4.1 MB/sec
formatter/numpy/ctypeslib.py               1.00  1911.8±33.91µs     8.7 MB/sec    1.02   1942.9±4.19µs     8.6 MB/sec
formatter/numpy/globals.py                 1.00    218.1±8.19µs    13.5 MB/sec    1.26  274.0±191.19µs    10.8 MB/sec
formatter/pydantic/types.py                1.00      4.1±0.11ms     6.2 MB/sec    1.00      4.1±0.09ms     6.2 MB/sec
linter/all-rules/large/dataset.py          1.00     12.1±0.06ms     3.4 MB/sec    1.02     12.3±0.09ms     3.3 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.2±0.02ms     5.2 MB/sec    1.01      3.3±0.01ms     5.1 MB/sec
linter/all-rules/numpy/globals.py          1.00    449.7±1.70µs     6.6 MB/sec    1.01    454.1±4.27µs     6.5 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.5±0.04ms     4.6 MB/sec    1.01      5.6±0.02ms     4.6 MB/sec
linter/default-rules/large/dataset.py      1.00      6.3±0.03ms     6.5 MB/sec    1.01      6.3±0.02ms     6.4 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1334.2±4.50µs    12.5 MB/sec    1.02  1359.4±11.90µs    12.2 MB/sec
linter/default-rules/numpy/globals.py      1.00    151.8±2.85µs    19.4 MB/sec    1.01    153.3±1.25µs    19.2 MB/sec
linter/default-rules/pydantic/types.py     1.00      2.8±0.01ms     9.2 MB/sec    1.01      2.8±0.01ms     9.1 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00     11.5±0.40ms     3.5 MB/sec    1.02     11.8±0.52ms     3.5 MB/sec
formatter/numpy/ctypeslib.py               1.00      2.2±0.08ms     7.7 MB/sec    1.05      2.3±0.13ms     7.3 MB/sec
formatter/numpy/globals.py                 1.00   253.4±13.62µs    11.6 MB/sec    1.01   255.1±19.54µs    11.6 MB/sec
formatter/pydantic/types.py                1.00      4.8±0.25ms     5.3 MB/sec    1.01      4.9±0.21ms     5.3 MB/sec
linter/all-rules/large/dataset.py          1.01     15.4±0.56ms     2.6 MB/sec    1.00     15.1±1.06ms     2.7 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      4.2±0.15ms     3.9 MB/sec    1.00      4.2±0.19ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.00   530.1±21.63µs     5.6 MB/sec    1.03   547.6±56.73µs     5.4 MB/sec
linter/all-rules/pydantic/types.py         1.02      7.2±0.24ms     3.6 MB/sec    1.00      7.0±0.27ms     3.6 MB/sec
linter/default-rules/large/dataset.py      1.00      8.6±0.24ms     4.7 MB/sec    1.00      8.6±0.23ms     4.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.01  1756.6±67.20µs     9.5 MB/sec    1.00  1736.4±59.37µs     9.6 MB/sec
linter/default-rules/numpy/globals.py      1.00    210.9±9.35µs    14.0 MB/sec    1.05   220.5±11.37µs    13.4 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.7±0.10ms     6.9 MB/sec    1.02      3.8±0.15ms     6.8 MB/sec

@tjkuson tjkuson marked this pull request as ready for review August 8, 2023 17:39
@charliermarsh
Copy link
Member

Awesome, thank you. I'm wondering, could we instead make it impossible to create a TabSize with a size of 0, by using NonZeroU8 as the wrapped type? Something like this:

diff --git a/crates/ruff/src/line_width.rs b/crates/ruff/src/line_width.rs
index 8619b42aa..1700725ae 100644
--- a/crates/ruff/src/line_width.rs
+++ b/crates/ruff/src/line_width.rs
@@ -1,4 +1,6 @@
 use serde::{Deserialize, Serialize};
+use std::num::NonZeroU8;
+use std::ops::Deref;
 use unicode_width::UnicodeWidthChar;
 
 use ruff_macros::CacheKey;
@@ -83,7 +85,7 @@ impl LineWidth {
     }
 
     fn update(mut self, chars: impl Iterator<Item = char>) -> Self {
-        let tab_size: usize = self.tab_size.into();
+        let tab_size: usize = self.tab_size.as_usize();
         for c in chars {
             match c {
                 '\t' => {
@@ -144,22 +146,22 @@ impl PartialOrd<LineLength> for LineWidth {
 /// The size of a tab.
 #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, CacheKey)]
 #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
-pub struct TabSize(pub u8);
+pub struct TabSize(pub NonZeroU8);
 
-impl Default for TabSize {
-    fn default() -> Self {
-        Self(4)
+impl TabSize {
+    fn as_usize(&self) -> usize {
+        self.0.get() as usize
     }
 }
 
-impl From<u8> for TabSize {
-    fn from(tab_size: u8) -> Self {
-        Self(tab_size)
+impl Default for TabSize {
+    fn default() -> Self {
+        Self(NonZeroU8::new(4).unwrap())
     }
 }
 
-impl From<TabSize> for usize {
-    fn from(tab_size: TabSize) -> Self {
-        tab_size.0 as usize
+impl From<NonZeroU8> for TabSize {
+    fn from(tab_size: NonZeroU8) -> Self {
+        Self(tab_size)
     }
 }
diff --git a/crates/ruff/src/message/text.rs b/crates/ruff/src/message/text.rs
index 3aa5ebc54..a8349cef4 100644
--- a/crates/ruff/src/message/text.rs
+++ b/crates/ruff/src/message/text.rs
@@ -1,6 +1,7 @@
 use std::borrow::Cow;
 use std::fmt::{Display, Formatter};
 use std::io::Write;
+use std::num::NonZeroU8;
 
 use annotate_snippets::display_list::{DisplayList, FormatOptions};
 use annotate_snippets::snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation};
@@ -16,6 +17,7 @@ use crate::line_width::{LineWidth, TabSize};
 use crate::message::diff::Diff;
 use crate::message::{Emitter, EmitterContext, Message};
 use crate::registry::AsRule;
+use crate::rules::pycodestyle::rules::logical_lines::Whitespace::Tab;
 use crate::source_kind::SourceKind;
 
 bitflags! {
@@ -293,12 +295,10 @@ impl Display for MessageCodeFrame<'_> {
 }
 
 fn replace_whitespace(source: &str, annotation_range: TextRange) -> SourceCode {
-    static TAB_SIZE: TabSize = TabSize(4); // TODO(jonathan): use `tab-size`
-
     let mut result = String::new();
     let mut last_end = 0;
     let mut range = annotation_range;
-    let mut line_width = LineWidth::new(TAB_SIZE);
+    let mut line_width = LineWidth::new(TabSize::default());
 
     for (index, c) in source.char_indices() {
         let old_width = line_width.get();
diff --git a/crates/ruff_cache/src/cache_key.rs b/crates/ruff_cache/src/cache_key.rs
index e015112bd..c62e580d1 100644
--- a/crates/ruff_cache/src/cache_key.rs
+++ b/crates/ruff_cache/src/cache_key.rs
@@ -2,6 +2,7 @@ use std::borrow::Cow;
 use std::collections::hash_map::DefaultHasher;
 use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
 use std::hash::{Hash, Hasher};
+use std::num::NonZeroU8;
 use std::ops::{Deref, DerefMut};
 use std::path::{Path, PathBuf};
 
@@ -205,6 +206,13 @@ impl CacheKey for i8 {
     }
 }
 
+impl CacheKey for NonZeroU8 {
+    #[inline]
+    fn cache_key(&self, state: &mut CacheKeyHasher) {
+        state.write_u8(self.get());
+    }
+}
+
 macro_rules! impl_cache_key_tuple {
     () => (
         impl CacheKey for () {

@charliermarsh charliermarsh merged commit 1b9fed8 into astral-sh:main Aug 8, 2023
17 checks passed
@charliermarsh
Copy link
Member

Awesome, thanks!

@charliermarsh charliermarsh added the bug Something isn't working label Aug 8, 2023
@zanieb zanieb mentioned this pull request Aug 9, 2023
zanieb added a commit that referenced this pull request Aug 9, 2023
## What's Changed

This release fixes a few bugs, notably the previous release announced a
breaking change where the default target
Python version changed from 3.10 to 3.8 but it was not applied. Thanks
to @rco-ableton for fixing this in
#6444

### Bug Fixes
* Do not trigger `S108` if path is inside `tempfile.*` call by
@dhruvmanila in #6416
* Do not allow on zero tab width by @tjkuson in
#6429
* Fix false-positive in submodule resolution by @charliermarsh in
#6435

## New Contributors
* @rco-ableton made their first contribution in
#6444

**Full Changelog**:
v0.0.283...v0.0.284
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Aug 10, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `^0.0.281`
-> `^0.0.284` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.281/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.281/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.284`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.284)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.283...v0.0.284)

#### What's Changed

This release fixes a few bugs, notably the previous release announced a
breaking change where the default target
Python version changed from 3.10 to 3.8 but the change was not applied.
Thanks to [@&#8203;rco-ableton](https://togithub.com/rco-ableton) for
fixing this in

[astral-sh/ruff#6444

##### Bug Fixes

- Do not trigger `S108` if path is inside `tempfile.*` call by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#6416
- Do not allow on zero tab width by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#6429
- Fix false-positive in submodule resolution by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6435

#### New Contributors

- [@&#8203;rco-ableton](https://togithub.com/rco-ableton) made their
first contribution in
[astral-sh/ruff#6444

**Full Changelog**:
astral-sh/ruff@v0.0.283...v0.0.284

###
[`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Breaking Changes

- Assume Python 3.8 instead of 3.10 for target version by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6397

##### Rules

- \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead
of `Self` in return annotations by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#6204
- \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6215
- \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6316
- \[`pylint`] `E1300`: Detects invalid string format characters by
[@&#8203;silvanocerza](https://togithub.com/silvanocerza) in
[astral-sh/ruff#6171
- \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695
syntax by [@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6289

##### Rule Changes

- \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded
functions by [@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6307
- \[`flake8-logging-format`] Allow capitalized names for logger
candidate heuristic match by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6356
- \[`flake8-pyi`] Applicable rules are now checked non-stub code by
[@&#8203;andersk](https://togithub.com/andersk) in
[astral-sh/ruff#6297
- `PYI013`:
[`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body)
- `PYI016`:
[`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member)
- `PYI018`:
[`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var)
- `PYI019`:
[`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type)
- `PYI024`:
[`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple)
- `PYI025`:
[`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import)
- `PYI030`:
[`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union)
- `PYI032`:
[`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation)
- `PYI034`:
[`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type)
- `PYI036`:
[`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation)
- `PYI041`:
[`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union)
- `PYI042`:
[`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias)
- `PYI043`:
[`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias)
- `PYI045`:
[`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable)
- `PYI046`:
[`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol)
- `PYI047`:
[`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias)
- `PYI049`:
[`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict)
- `PYI050`:
[`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub)
(Python ≥ 3.11)
- `PYI051`:
[`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union)
- `PYI056`:
[`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all)
- \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6354
- \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6239
- \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before
and lines-after rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6344
- \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__`
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6247
- \[`pylint`] `PLR0124`: Add detection of comparisons with built-in
calls by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6324
- \[`pyupgrade`] `UP032`: Add support for `await` expressions in
f-strings by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6304
- \[`pyupgrade`] `UP032`: Add support for implicitly concatenated
strings by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6263
- \[`pyupgrade`] `UP032`: Add support for repeated format fields by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6266
- \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by
[@&#8203;bluetech](https://togithub.com/bluetech) in
[astral-sh/ruff#6273

##### Bug Fixes

- \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of
`Annotated` by [@&#8203;PIG208](https://togithub.com/PIG208) in
[astral-sh/ruff#6361
- \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6350
- \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6283
- \[`flake8`] `F841`: Update autofix to not remove Jupyer magic
expressions by [@&#8203;dhruvmanila](https://togithub.com/dhruvmanila)
in
[astral-sh/ruff#6141
- \[`pycodestyle`] `E721`: Include comparisons to builtin types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6325
- \[`pycodestyle`] `E721`: Match left-hand side `types()` call in
`types-comparison` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6326
- \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within
the right-hand side by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6364
- \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present
around format call arguments by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6342
- \[`pyupgrade`] `UP032`: Improve invalid expression check by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6308
- Avoid attempting to fix `.format(...)` calls with too-few-arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6401
- Fix bug where `.gitignore` files in parent directories were
incorrectly used by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6368
- Fix duplicate violations raised on nested bitwise or `Union`
expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6399

##### Playground

- Add a simple tooltip to the sidebar by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6295
- Add an icon for FIR by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6292
- Increase icon opacity on-hover by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6291
- Tweak background on theme button by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6290

##### Other Changes

- Improve handling of violations around Jupyter magic expressions by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5552
- Reduce memory usage by boxing type params and arguments fields on the
class definition node by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6275
- Upgrade Rust to 1.71 by [@&#8203;zanieb](https://togithub.com/zanieb)
in
[astral-sh/ruff#6323

#### New Contributors

- [@&#8203;silvanocerza](https://togithub.com/silvanocerza) made their
first contribution in
[astral-sh/ruff#6171
- [@&#8203;PIG208](https://togithub.com/PIG208) made their first
contribution in
[astral-sh/ruff#6361

**Full Changelog**:
astral-sh/ruff@v0.0.282...v0.0.283

###
[`v0.0.282`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.282)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.281...v0.0.282)

<!-- Release notes generated using configuration in .github/release.yml
at v0.0.282 -->

#### What's Changed

##### Bug Fixes

- Reset model state when exiting deferred visitors by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6208
- Skip trivia when searching for named exception by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6218
- Avoid PERF401 false positive on list access in loop by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6220
- Avoid detecting continuations at non-start-of-line by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6219
- Revert "Expand scope of `quoted-annotation` rule
([#&#8203;5766](https://togithub.com/astral-sh/ruff/issues/5766))" by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6237

#### New Contributors

- [@&#8203;klistwan](https://togithub.com/klistwan) made their first
contribution in
[astral-sh/ruff#6146

**Full Changelog**:
astral-sh/ruff@v0.0.281...v0.0.282

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ixm-one/pytest-cmake-presets).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request Aug 11, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.282`
-> `==0.0.284` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.284`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.284)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.283...v0.0.284)

#### What's Changed

This release fixes a few bugs, notably the previous release announced a
breaking change where the default target
Python version changed from 3.10 to 3.8 but the change was not applied.
Thanks to [@&#8203;rco-ableton](https://togithub.com/rco-ableton) for
fixing this in

[astral-sh/ruff#6444

##### Bug Fixes

- Do not trigger `S108` if path is inside `tempfile.*` call by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#6416
- Do not allow on zero tab width by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#6429
- Fix false-positive in submodule resolution by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6435

#### New Contributors

- [@&#8203;rco-ableton](https://togithub.com/rco-ableton) made their
first contribution in
[astral-sh/ruff#6444

**Full Changelog**:
astral-sh/ruff@v0.0.283...v0.0.284

###
[`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Breaking Changes

- Assume Python 3.8 instead of 3.10 for target version by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6397

##### Rules

- \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead
of `Self` in return annotations by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#6204
- \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6215
- \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6316
- \[`pylint`] `E1300`: Detects invalid string format characters by
[@&#8203;silvanocerza](https://togithub.com/silvanocerza) in
[astral-sh/ruff#6171
- \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695
syntax by [@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6289

##### Rule Changes

- \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded
functions by [@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6307
- \[`flake8-logging-format`] Allow capitalized names for logger
candidate heuristic match by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6356
- \[`flake8-pyi`] Applicable rules are now checked non-stub code by
[@&#8203;andersk](https://togithub.com/andersk) in
[astral-sh/ruff#6297
- `PYI013`:
[`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body)
- `PYI016`:
[`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member)
- `PYI018`:
[`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var)
- `PYI019`:
[`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type)
- `PYI024`:
[`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple)
- `PYI025`:
[`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import)
- `PYI030`:
[`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union)
- `PYI032`:
[`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation)
- `PYI034`:
[`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type)
- `PYI036`:
[`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation)
- `PYI041`:
[`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union)
- `PYI042`:
[`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias)
- `PYI043`:
[`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias)
- `PYI045`:
[`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable)
- `PYI046`:
[`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol)
- `PYI047`:
[`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias)
- `PYI049`:
[`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict)
- `PYI050`:
[`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub)
(Python ≥ 3.11)
- `PYI051`:
[`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union)
- `PYI056`:
[`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all)
- \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6354
- \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6239
- \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before
and lines-after rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6344
- \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__`
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6247
- \[`pylint`] `PLR0124`: Add detection of comparisons with built-in
calls by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6324
- \[`pyupgrade`] `UP032`: Add support for `await` expressions in
f-strings by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6304
- \[`pyupgrade`] `UP032`: Add support for implicitly concatenated
strings by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6263
- \[`pyupgrade`] `UP032`: Add support for repeated format fields by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6266
- \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by
[@&#8203;bluetech](https://togithub.com/bluetech) in
[astral-sh/ruff#6273

##### Bug Fixes

- \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of
`Annotated` by [@&#8203;PIG208](https://togithub.com/PIG208) in
[astral-sh/ruff#6361
- \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6350
- \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6283
- \[`flake8`] `F841`: Update autofix to not remove Jupyer magic
expressions by [@&#8203;dhruvmanila](https://togithub.com/dhruvmanila)
in
[astral-sh/ruff#6141
- \[`pycodestyle`] `E721`: Include comparisons to builtin types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6325
- \[`pycodestyle`] `E721`: Match left-hand side `types()` call in
`types-comparison` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6326
- \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within
the right-hand side by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6364
- \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present
around format call arguments by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6342
- \[`pyupgrade`] `UP032`: Improve invalid expression check by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6308
- Avoid attempting to fix `.format(...)` calls with too-few-arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6401
- Fix bug where `.gitignore` files in parent directories were
incorrectly used by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6368
- Fix duplicate violations raised on nested bitwise or `Union`
expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6399

##### Playground

- Add a simple tooltip to the sidebar by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6295
- Add an icon for FIR by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6292
- Increase icon opacity on-hover by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6291
- Tweak background on theme button by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6290

##### Other Changes

- Improve handling of violations around Jupyter magic expressions by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5552
- Reduce memory usage by boxing type params and arguments fields on the
class definition node by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6275
- Upgrade Rust to 1.71 by [@&#8203;zanieb](https://togithub.com/zanieb)
in
[astral-sh/ruff#6323

#### New Contributors

- [@&#8203;silvanocerza](https://togithub.com/silvanocerza) made their
first contribution in
[astral-sh/ruff#6171
- [@&#8203;PIG208](https://togithub.com/PIG208) made their first
contribution in
[astral-sh/ruff#6361

**Full Changelog**:
astral-sh/ruff@v0.0.282...v0.0.283

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/pyrainbird).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/flux-local that referenced this pull request Aug 11, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.282`
-> `==0.0.284` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.284`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.284)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.283...v0.0.284)

#### What's Changed

This release fixes a few bugs, notably the previous release announced a
breaking change where the default target
Python version changed from 3.10 to 3.8 but the change was not applied.
Thanks to [@&#8203;rco-ableton](https://togithub.com/rco-ableton) for
fixing this in

[astral-sh/ruff#6444

##### Bug Fixes

- Do not trigger `S108` if path is inside `tempfile.*` call by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#6416
- Do not allow on zero tab width by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#6429
- Fix false-positive in submodule resolution by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6435

#### New Contributors

- [@&#8203;rco-ableton](https://togithub.com/rco-ableton) made their
first contribution in
[astral-sh/ruff#6444

**Full Changelog**:
astral-sh/ruff@v0.0.283...v0.0.284

###
[`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Breaking Changes

- Assume Python 3.8 instead of 3.10 for target version by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6397

##### Rules

- \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead
of `Self` in return annotations by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#6204
- \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6215
- \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6316
- \[`pylint`] `E1300`: Detects invalid string format characters by
[@&#8203;silvanocerza](https://togithub.com/silvanocerza) in
[astral-sh/ruff#6171
- \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695
syntax by [@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6289

##### Rule Changes

- \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded
functions by [@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#6307
- \[`flake8-logging-format`] Allow capitalized names for logger
candidate heuristic match by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6356
- \[`flake8-pyi`] Applicable rules are now checked non-stub code by
[@&#8203;andersk](https://togithub.com/andersk) in
[astral-sh/ruff#6297
- `PYI013`:
[`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body)
- `PYI016`:
[`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member)
- `PYI018`:
[`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var)
- `PYI019`:
[`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type)
- `PYI024`:
[`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple)
- `PYI025`:
[`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import)
- `PYI030`:
[`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union)
- `PYI032`:
[`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation)
- `PYI034`:
[`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type)
- `PYI036`:
[`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation)
- `PYI041`:
[`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union)
- `PYI042`:
[`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias)
- `PYI043`:
[`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias)
- `PYI045`:
[`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable)
- `PYI046`:
[`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol)
- `PYI047`:
[`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias)
- `PYI049`:
[`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict)
- `PYI050`:
[`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub)
(Python ≥ 3.11)
- `PYI051`:
[`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union)
- `PYI056`:
[`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all)
- \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[astral-sh/ruff#6354
- \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6239
- \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before
and lines-after rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6344
- \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__`
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6247
- \[`pylint`] `PLR0124`: Add detection of comparisons with built-in
calls by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6324
- \[`pyupgrade`] `UP032`: Add support for `await` expressions in
f-strings by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6304
- \[`pyupgrade`] `UP032`: Add support for implicitly concatenated
strings by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6263
- \[`pyupgrade`] `UP032`: Add support for repeated format fields by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6266
- \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by
[@&#8203;bluetech](https://togithub.com/bluetech) in
[astral-sh/ruff#6273

##### Bug Fixes

- \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of
`Annotated` by [@&#8203;PIG208](https://togithub.com/PIG208) in
[astral-sh/ruff#6361
- \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6350
- \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6283
- \[`flake8`] `F841`: Update autofix to not remove Jupyer magic
expressions by [@&#8203;dhruvmanila](https://togithub.com/dhruvmanila)
in
[astral-sh/ruff#6141
- \[`pycodestyle`] `E721`: Include comparisons to builtin types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6325
- \[`pycodestyle`] `E721`: Match left-hand side `types()` call in
`types-comparison` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6326
- \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within
the right-hand side by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6364
- \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present
around format call arguments by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6342
- \[`pyupgrade`] `UP032`: Improve invalid expression check by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#6308
- Avoid attempting to fix `.format(...)` calls with too-few-arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6401
- Fix bug where `.gitignore` files in parent directories were
incorrectly used by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6368
- Fix duplicate violations raised on nested bitwise or `Union`
expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6399

##### Playground

- Add a simple tooltip to the sidebar by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6295
- Add an icon for FIR by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6292
- Increase icon opacity on-hover by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6291
- Tweak background on theme button by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6290

##### Other Changes

- Improve handling of violations around Jupyter magic expressions by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5552
- Reduce memory usage by boxing type params and arguments fields on the
class definition node by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#6275
- Upgrade Rust to 1.71 by [@&#8203;zanieb](https://togithub.com/zanieb)
in
[astral-sh/ruff#6323

#### New Contributors

- [@&#8203;silvanocerza](https://togithub.com/silvanocerza) made their
first contribution in
[astral-sh/ruff#6171
- [@&#8203;PIG208](https://togithub.com/PIG208) made their first
contribution in
[astral-sh/ruff#6361

**Full Changelog**:
astral-sh/ruff@v0.0.282...v0.0.283

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
durumu pushed a commit to durumu/ruff that referenced this pull request Aug 12, 2023
## Summary

Error if `tab-size` is set to zero (it is used as a divisor). Closes
astral-sh#6423.

Also fixes a typo.

## Test Plan

Running ruff with a config

```toml
[tool.ruff]
tab-size = 0
```

returns an error message to the user saying that `tab-size` must be
greater than zero.
durumu pushed a commit to durumu/ruff that referenced this pull request Aug 12, 2023
## What's Changed

This release fixes a few bugs, notably the previous release announced a
breaking change where the default target
Python version changed from 3.10 to 3.8 but it was not applied. Thanks
to @rco-ableton for fixing this in
astral-sh#6444

### Bug Fixes
* Do not trigger `S108` if path is inside `tempfile.*` call by
@dhruvmanila in astral-sh#6416
* Do not allow on zero tab width by @tjkuson in
astral-sh#6429
* Fix false-positive in submodule resolution by @charliermarsh in
astral-sh#6435

## New Contributors
* @rco-ableton made their first contribution in
astral-sh#6444

**Full Changelog**:
astral-sh/ruff@v0.0.283...v0.0.284
@tjkuson tjkuson deleted the zero-tab-width branch August 15, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tab-size = 0 leads to panic.
2 participants