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

Introduce tab-size to correcly calculate the line length with tabulations #4167

Merged
merged 29 commits into from May 24, 2023

Conversation

JonathanPlasse
Copy link
Contributor

@JonathanPlasse JonathanPlasse commented May 1, 2023

I added the setting tab-size to set the tabulation width in checks like E501.
I use as default 4 as it is the most common case.

With tab-size = 1 or tab-size = 2:
tab_size_1_2
With tab-size = 4:
tab_size_4
With tab-size = 8:
tab_size_8

Warning
The violation locations are offset in the snapshots.

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     14.1±0.12ms     2.9 MB/sec    1.02     14.3±0.15ms     2.8 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.4±0.02ms     5.0 MB/sec    1.02      3.4±0.03ms     4.9 MB/sec
linter/all-rules/numpy/globals.py          1.00    414.8±0.68µs     7.1 MB/sec    1.03    426.4±3.52µs     6.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.8±0.04ms     4.4 MB/sec    1.02      5.9±0.04ms     4.3 MB/sec
linter/default-rules/large/dataset.py      1.00      6.6±0.03ms     6.2 MB/sec    1.02      6.7±0.03ms     6.1 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1425.5±7.89µs    11.7 MB/sec    1.03   1469.6±1.45µs    11.3 MB/sec
linter/default-rules/numpy/globals.py      1.00    157.7±0.24µs    18.7 MB/sec    1.07    168.1±1.05µs    17.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.0±0.01ms     8.6 MB/sec    1.03      3.1±0.01ms     8.3 MB/sec
parser/large/dataset.py                    1.01      5.2±0.01ms     7.8 MB/sec    1.00      5.2±0.01ms     7.9 MB/sec
parser/numpy/ctypeslib.py                  1.01   1024.1±0.50µs    16.3 MB/sec    1.00   1017.0±2.44µs    16.4 MB/sec
parser/numpy/globals.py                    1.01    104.8±0.19µs    28.2 MB/sec    1.00    104.1±0.25µs    28.3 MB/sec
parser/pydantic/types.py                   1.01      2.2±0.01ms    11.3 MB/sec    1.00      2.2±0.01ms    11.4 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     20.7±0.58ms  2016.4 KB/sec    1.02     21.0±0.75ms  1985.5 KB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      5.2±0.20ms     3.2 MB/sec    1.02      5.2±0.21ms     3.2 MB/sec
linter/all-rules/numpy/globals.py          1.00   604.1±28.12µs     4.9 MB/sec    1.04   626.8±34.68µs     4.7 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.6±0.33ms     3.0 MB/sec    1.01      8.6±0.34ms     2.9 MB/sec
linter/default-rules/large/dataset.py      1.00     10.1±0.45ms     4.0 MB/sec    1.00     10.1±0.31ms     4.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.1±0.07ms     8.0 MB/sec    1.03      2.1±0.09ms     7.8 MB/sec
linter/default-rules/numpy/globals.py      1.00   233.7±14.36µs    12.6 MB/sec    1.09   253.9±17.78µs    11.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.5±0.17ms     5.7 MB/sec    1.03      4.6±0.17ms     5.5 MB/sec
parser/large/dataset.py                    1.00      8.1±0.20ms     5.0 MB/sec    1.00      8.1±0.24ms     5.0 MB/sec
parser/numpy/ctypeslib.py                  1.01  1549.9±70.00µs    10.7 MB/sec    1.00  1529.8±67.91µs    10.9 MB/sec
parser/numpy/globals.py                    1.01    157.0±9.09µs    18.8 MB/sec    1.00    155.1±7.79µs    19.0 MB/sec
parser/pydantic/types.py                   1.01      3.5±0.13ms     7.4 MB/sec    1.00      3.4±0.16ms     7.4 MB/sec

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

There are a few places where we do not suggest a code fix if the line length after fixing exceeds the limit. We need to change these checks to handle tabs correctly too.

https://github.com/search?q=repo%3Acharliermarsh%2Fruff%20.width()&type=code

crates/ruff/src/rules/pycodestyle/helpers.rs Outdated Show resolved Hide resolved
crates/ruff/src/rules/pycodestyle/helpers.rs Outdated Show resolved Hide resolved
@JonathanPlasse JonathanPlasse marked this pull request as draft May 4, 2023 17:41
@JonathanPlasse JonathanPlasse force-pushed the fix-e501-with-tabulation branch 2 times, most recently from c3d9237 to d908ea4 Compare May 18, 2023 16:18
@JonathanPlasse JonathanPlasse marked this pull request as ready for review May 18, 2023 16:19
@JonathanPlasse
Copy link
Contributor Author

Should I add a fixture for all affected rules with tabulations and UTF-8 characters?

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add a fixture for all affected rules with tabulations and UTF-8 characters?

That would be awesome to ensure we don't accidentally break it in future refactors.

crates/ruff/src/rules/flake8_simplify/rules/ast_if.rs Outdated Show resolved Hide resolved
crates/ruff/src/rules/flake8_simplify/rules/ast_if.rs Outdated Show resolved Hide resolved
crates/ruff/src/rules/pycodestyle/helpers.rs Outdated Show resolved Hide resolved
crates/ruff/src/settings/defaults.rs Outdated Show resolved Hide resolved
@JonathanPlasse JonathanPlasse marked this pull request as draft May 20, 2023 07:19
@JonathanPlasse JonathanPlasse force-pushed the fix-e501-with-tabulation branch 2 times, most recently from cda81f3 to 02cab1e Compare May 20, 2023 14:09
@JonathanPlasse JonathanPlasse marked this pull request as ready for review May 20, 2023 15:19
@JonathanPlasse JonathanPlasse force-pushed the fix-e501-with-tabulation branch 3 times, most recently from 8ef580a to a892ffd Compare May 20, 2023 17:37
@JonathanPlasse
Copy link
Contributor Author

All concerned fixtures now have tests with UTF-8 and check with line length. Some also contain tabulations.
I would like to merge this and maybe work on the VSCode range offset problem with UTF-8 characters with E501 later.

@JonathanPlasse JonathanPlasse changed the title Fix E501 with tabulation Calculate line-length taking into account tab-size May 21, 2023
@JonathanPlasse JonathanPlasse changed the title Calculate line-length taking into account tab-size Introduce tab-size to correcly calculate the line length with tabulations May 21, 2023
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I have a few comments around the implementations of the new width structs, and are uncertain if the caret is correctly placed in one test. But it is looking great overall!

crates/ruff/src/message/text.rs Outdated Show resolved Hide resolved
crates/ruff/src/rules/pycodestyle/helpers.rs Outdated Show resolved Hide resolved
crates/ruff/src/settings/line_width.rs Outdated Show resolved Hide resolved
impl Default for LineWidth<Length> {
fn default() -> Self {
Self {
width: 88,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason that we initialize the width to 88? Or what's the meaning of the width field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LineWidth<Length> or LineLength is the type representing line length settings.
88 comes from LINE_LENGTH.

crates/ruff/src/settings/line_width.rs Outdated Show resolved Hide resolved
crates/ruff/src/settings/line_width.rs Outdated Show resolved Hide resolved
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. I like it a lot how you centralized the logic for all the line width checks.

Could you add some documentation to LineLength and LineWdith and move LineWidth out of the settings module (it's not used in a settings context if I understand it correctly)?

@MichaReiser
Copy link
Member

Thank you.

@MichaReiser MichaReiser merged commit c6a760e into astral-sh:main May 24, 2023
15 checks passed
@JonathanPlasse
Copy link
Contributor Author

You are welcome, thank you for your review.

@JonathanPlasse JonathanPlasse deleted the fix-e501-with-tabulation branch May 24, 2023 08:25
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request May 25, 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://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`^0.0.269` -> `^0.0.270` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/compatibility-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/confidence-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.270`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.270)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270)

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

#### What's Changed

##### Rules

- \[`flake8-bandit`] Implement `paramiko-call` (`S601`) by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4500
- \[`flake8-pyi`] Add autofix for PYI009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4583
- \[`flake8-pyi`] Implement `PYI013` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4517
- \[`pylint`] Add `duplicate-value` (`W0130`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4515
- \[`pylint`] Add `named_expr_without_context` (`W0131`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4531
- \[`ruff`] Extend `RUF005` to recursive and literal-literal
concatenations by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4557
- \[`ruff`] Make ambiguous-unicode detection sensitive to 'word' context
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4552
- \[`ruff`] Name ambiguous characters by
[@&#8203;covracer](https://togithub.com/covracer) in
[astral-sh/ruff#4448

##### Settings

- Implement `--extend-fixable` option by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4297
- Support new `extend-per-file-ignores` setting by
[@&#8203;aacunningham](https://togithub.com/aacunningham) in
[astral-sh/ruff#4265

##### Bug Fixes

- Fix RUF010 auto-fix with parenthesis by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4524
- Parenthesize more sub-expressions in f-string conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4535
- Fix false-positive for TRY302 if exception cause is given by
[@&#8203;153957](https://togithub.com/153957) in
[astral-sh/ruff#4559
- Fix `# isort: split` comment detection in nested blocks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4584
- Avoid some false positives in dunder variable assigments by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4508
- Fix UP032 auto-fix with integers by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4525
- Improve reference resolution for deferred-annotations-within-classes
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4509
- Improve handling of `__qualname__`, `__module__`, and `__class__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4512
- Include empty success test in JUnit output by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4537
- Fix SIM110 and SIM111 ranges by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4545
- Ignore `#region` code folding marks in eradicate rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4546
- Avoid infinite loop for required imports with isort: off by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4581
- Make B007 fix relevance stricter by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4607
- Introduce `tab-size` to correcly calculate the line length with
tabulations by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4167
- Visit `TypeVar` and `NewType` name arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4627
- Improve `Message` sorting performance by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4624

#### New Contributors

- [@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) made their
first contribution in
[astral-sh/ruff#4516
- [@&#8203;density](https://togithub.com/density) made their first
contribution in
[astral-sh/ruff#4517
- [@&#8203;Mr-Pepe](https://togithub.com/Mr-Pepe) made their first
contribution in
[astral-sh/ruff#4540
- [@&#8203;153957](https://togithub.com/153957) made their first
contribution in
[astral-sh/ruff#4559
- [@&#8203;covracer](https://togithub.com/covracer) made their first
contribution in
[astral-sh/ruff#4448

**Full Changelog**:
astral-sh/ruff@v0.0.269...v0.0.270

</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://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets).

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

Signed-off-by: Renovate Bot <bot@renovateapp.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 May 26, 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://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`==0.0.269` -> `==0.0.270` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/compatibility-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/confidence-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.270`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.270)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270)

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

#### What's Changed

##### Rules

- \[`flake8-bandit`] Implement `paramiko-call` (`S601`) by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4500
- \[`flake8-pyi`] Add autofix for PYI009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4583
- \[`flake8-pyi`] Implement `PYI013` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4517
- \[`pylint`] Add `duplicate-value` (`W0130`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4515
- \[`pylint`] Add `named_expr_without_context` (`W0131`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4531
- \[`ruff`] Extend `RUF005` to recursive and literal-literal
concatenations by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4557
- \[`ruff`] Make ambiguous-unicode detection sensitive to 'word' context
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4552
- \[`ruff`] Name ambiguous characters by
[@&#8203;covracer](https://togithub.com/covracer) in
[astral-sh/ruff#4448

##### Settings

- Implement `--extend-fixable` option by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4297
- Support new `extend-per-file-ignores` setting by
[@&#8203;aacunningham](https://togithub.com/aacunningham) in
[astral-sh/ruff#4265

##### Bug Fixes

- Fix RUF010 auto-fix with parenthesis by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4524
- Parenthesize more sub-expressions in f-string conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4535
- Fix false-positive for TRY302 if exception cause is given by
[@&#8203;153957](https://togithub.com/153957) in
[astral-sh/ruff#4559
- Fix `# isort: split` comment detection in nested blocks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4584
- Avoid some false positives in dunder variable assigments by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4508
- Fix UP032 auto-fix with integers by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4525
- Improve reference resolution for deferred-annotations-within-classes
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4509
- Improve handling of `__qualname__`, `__module__`, and `__class__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4512
- Include empty success test in JUnit output by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4537
- Fix SIM110 and SIM111 ranges by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4545
- Ignore `#region` code folding marks in eradicate rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4546
- Avoid infinite loop for required imports with isort: off by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4581
- Make B007 fix relevance stricter by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4607
- Introduce `tab-size` to correcly calculate the line length with
tabulations by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4167
- Visit `TypeVar` and `NewType` name arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4627
- Improve `Message` sorting performance by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4624

#### New Contributors

- [@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) made their
first contribution in
[astral-sh/ruff#4516
- [@&#8203;density](https://togithub.com/density) made their first
contribution in
[astral-sh/ruff#4517
- [@&#8203;Mr-Pepe](https://togithub.com/Mr-Pepe) made their first
contribution in
[astral-sh/ruff#4540
- [@&#8203;153957](https://togithub.com/153957) made their first
contribution in
[astral-sh/ruff#4559
- [@&#8203;covracer](https://togithub.com/covracer) made their first
contribution in
[astral-sh/ruff#4448

**Full Changelog**:
astral-sh/ruff@v0.0.269...v0.0.270

</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://app.renovatebot.com/dashboard#github/allenporter/pyrainbird).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMDIuNCIsInVwZGF0ZWRJblZlciI6IjM1LjEwMi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

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 May 28, 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://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`==0.0.269` -> `==0.0.270` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/compatibility-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/confidence-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.270`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.270)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270)

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

#### What's Changed

##### Rules

- \[`flake8-bandit`] Implement `paramiko-call` (`S601`) by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4500
- \[`flake8-pyi`] Add autofix for PYI009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4583
- \[`flake8-pyi`] Implement `PYI013` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4517
- \[`pylint`] Add `duplicate-value` (`W0130`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4515
- \[`pylint`] Add `named_expr_without_context` (`W0131`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4531
- \[`ruff`] Extend `RUF005` to recursive and literal-literal
concatenations by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4557
- \[`ruff`] Make ambiguous-unicode detection sensitive to 'word' context
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4552
- \[`ruff`] Name ambiguous characters by
[@&#8203;covracer](https://togithub.com/covracer) in
[astral-sh/ruff#4448

##### Settings

- Implement `--extend-fixable` option by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4297
- Support new `extend-per-file-ignores` setting by
[@&#8203;aacunningham](https://togithub.com/aacunningham) in
[astral-sh/ruff#4265

##### Bug Fixes

- Fix RUF010 auto-fix with parenthesis by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4524
- Parenthesize more sub-expressions in f-string conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4535
- Fix false-positive for TRY302 if exception cause is given by
[@&#8203;153957](https://togithub.com/153957) in
[astral-sh/ruff#4559
- Fix `# isort: split` comment detection in nested blocks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4584
- Avoid some false positives in dunder variable assigments by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4508
- Fix UP032 auto-fix with integers by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4525
- Improve reference resolution for deferred-annotations-within-classes
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4509
- Improve handling of `__qualname__`, `__module__`, and `__class__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4512
- Include empty success test in JUnit output by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4537
- Fix SIM110 and SIM111 ranges by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4545
- Ignore `#region` code folding marks in eradicate rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4546
- Avoid infinite loop for required imports with isort: off by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4581
- Make B007 fix relevance stricter by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4607
- Introduce `tab-size` to correcly calculate the line length with
tabulations by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4167
- Visit `TypeVar` and `NewType` name arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4627
- Improve `Message` sorting performance by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4624

#### New Contributors

- [@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) made their
first contribution in
[astral-sh/ruff#4516
- [@&#8203;density](https://togithub.com/density) made their first
contribution in
[astral-sh/ruff#4517
- [@&#8203;Mr-Pepe](https://togithub.com/Mr-Pepe) made their first
contribution in
[astral-sh/ruff#4540
- [@&#8203;153957](https://togithub.com/153957) made their first
contribution in
[astral-sh/ruff#4559
- [@&#8203;covracer](https://togithub.com/covracer) made their first
contribution in
[astral-sh/ruff#4448

**Full Changelog**:
astral-sh/ruff@v0.0.269...v0.0.270

</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://app.renovatebot.com/dashboard#github/allenporter/flux-local).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E501: Does not count tab characters
2 participants