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

Extend RUF005 to recursive and literal-literal concatenations #4557

Merged
merged 20 commits into from May 24, 2023

Conversation

hoel-bagard
Copy link
Contributor

@hoel-bagard hoel-bagard commented May 21, 2023

This attempts to fix #3496.

It introduces the following changes:

  • The building of the new suggested expression is moved to a recursive function to handle cases with multiple concatenations on a single line.
  • The rule now also checks for concatenations of lists/tuples (for example a = [1] + [2]). (I'm not sure if this behavior is desired, it's not directly related to the issue).
  • New tests to check the new behavior.

@github-actions
Copy link
Contributor

github-actions bot commented May 21, 2023

PR Check Results

Ecosystem

ℹ️ ecosystem check detected changes. (+10, -5, 0 error(s))

airflow (+9, -5)

+ airflow/providers/apache/beam/hooks/beam.py:262:30: RUF005 [*] Consider `[py_interpreter, *py_options, py_file]` instead of concatenation
- airflow/providers/apache/beam/hooks/beam.py:262:30: RUF005 [*] Consider `[py_interpreter, *py_options]` instead of concatenation
+ airflow/providers/apache/hive/hooks/hive.py:170:16: RUF005 [*] Consider `[hive_bin, *cmd_extra, *hive_params_list]` instead of concatenation
- airflow/providers/apache/hive/hooks/hive.py:170:16: RUF005 [*] Consider `[hive_bin, *cmd_extra]` instead of concatenation
+ airflow/providers/apache/hive/operators/hive_stats.py:172:13: RUF005 [*] Consider `(self.ds, self.dttm, self.table, part_json, r[0][0], r[0][1], r[1])` instead of concatenation
+ airflow/utils/python_virtualenv.py:43:11: RUF005 [*] Consider `[f"{tmp_dir}/bin/pip", "install", *pip_install_options, "-r"]` instead of concatenation
- airflow/utils/python_virtualenv.py:43:11: RUF005 [*] Consider `[f"{tmp_dir}/bin/pip", "install", *pip_install_options]` instead of concatenation
+ tests/providers/amazon/aws/hooks/test_eks.py:1170:17: RUF005 Consider `[POD_EXECUTION_ROLE_ARN, (ClusterAttributes.CLUSTER_NAME, cluster_name), (FargateProfileAttributes.FARGATE_PROFILE_NAME, fargate_profile_name), (FargateProfileAttributes.SELECTORS, selectors)]` instead of concatenation
- tests/providers/amazon/aws/hooks/test_eks.py:754:17: RUF005 Consider `[*NodegroupInputs.REQUIRED, (ClusterAttributes.CLUSTER_NAME, generated_test_data.existing_cluster_name), (NodegroupAttributes.NODEGROUP_NAME, nodegroup_name)]` instead of concatenation
+ tests/providers/apache/hive/operators/test_hive_stats.py:155:13: RUF005 [*] Consider `(hive_stats_collection_operator.ds, hive_stats_collection_operator.dttm, hive_stats_collection_operator.table, mock_json_dumps.return_value, r[0][0], r[0][1], r[1])` instead of concatenation
+ tests/providers/apache/hive/operators/test_hive_stats.py:203:13: RUF005 [*] Consider `(hive_stats_collection_operator.ds, hive_stats_collection_operator.dttm, hive_stats_collection_operator.table, mock_json_dumps.return_value, r[0][0], r[0][1], r[1])` instead of concatenation
+ tests/providers/apache/hive/operators/test_hive_stats.py:251:13: RUF005 [*] Consider `(hive_stats_collection_operator.ds, hive_stats_collection_operator.dttm, hive_stats_collection_operator.table, mock_json_dumps.return_value, r[0][0], r[0][1], r[1])` instead of concatenation
+ tests/utils/test_python_virtualenv.py:64:13: RUF005 [*] Consider `["/VENV/bin/pip", "install", *pip_install_options, "apache-beam[gcp]"]` instead of concatenation
- tests/utils/test_python_virtualenv.py:64:13: RUF005 [*] Consider `["/VENV/bin/pip", "install", *pip_install_options]` instead of concatenation

scikit-build (+1, -0)

+ tests/test_issue342_cmake_osx_args_in_setup.py:178:44: RUF005 [*] Consider `["build", *cli_setup_args, "--", *cli_cmake_args]` instead of concatenation

Rules changed: 1
Rule Changes Additions Removals
RUF005 15 10 5

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     16.7±0.22ms     2.4 MB/sec    1.00     16.7±0.15ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      4.0±0.02ms     4.2 MB/sec    1.00      4.0±0.04ms     4.2 MB/sec
linter/all-rules/numpy/globals.py          1.00    494.0±2.97µs     6.0 MB/sec    1.01   499.0±18.17µs     5.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.9±0.05ms     3.7 MB/sec    1.00      6.8±0.08ms     3.7 MB/sec
linter/default-rules/large/dataset.py      1.00      8.0±0.04ms     5.1 MB/sec    1.00      8.0±0.09ms     5.1 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1722.6±19.07µs     9.7 MB/sec    1.00  1714.7±18.93µs     9.7 MB/sec
linter/default-rules/numpy/globals.py      1.01   207.8±11.11µs    14.2 MB/sec    1.00    205.3±9.97µs    14.4 MB/sec
linter/default-rules/pydantic/types.py     1.01      3.7±0.12ms     6.9 MB/sec    1.00      3.7±0.09ms     7.0 MB/sec
parser/large/dataset.py                    1.00      6.2±0.03ms     6.6 MB/sec    1.01      6.2±0.03ms     6.6 MB/sec
parser/numpy/ctypeslib.py                  1.00   1216.0±6.28µs    13.7 MB/sec    1.00   1219.4±8.27µs    13.7 MB/sec
parser/numpy/globals.py                    1.00    124.9±0.69µs    23.6 MB/sec    1.00    124.5±0.99µs    23.7 MB/sec
parser/pydantic/types.py                   1.00      2.7±0.01ms     9.6 MB/sec    1.00      2.7±0.02ms     9.6 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     16.3±0.09ms     2.5 MB/sec    1.00     16.3±0.05ms     2.5 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.2±0.02ms     4.0 MB/sec    1.00      4.2±0.02ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.00    423.9±4.29µs     7.0 MB/sec    1.00    425.3±5.02µs     6.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.0±0.05ms     3.6 MB/sec    1.00      7.0±0.02ms     3.7 MB/sec
linter/default-rules/large/dataset.py      1.00      8.2±0.04ms     5.0 MB/sec    1.00      8.2±0.02ms     5.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1683.0±7.76µs     9.9 MB/sec    1.00   1686.9±7.08µs     9.9 MB/sec
linter/default-rules/numpy/globals.py      1.00    181.0±1.08µs    16.3 MB/sec    1.01    183.0±6.98µs    16.1 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.7±0.02ms     6.9 MB/sec    1.00      3.7±0.01ms     6.9 MB/sec
parser/large/dataset.py                    1.00      6.7±0.01ms     6.1 MB/sec    1.01      6.8±0.03ms     6.0 MB/sec
parser/numpy/ctypeslib.py                  1.00   1268.7±7.42µs    13.1 MB/sec    1.01   1276.7±5.69µs    13.0 MB/sec
parser/numpy/globals.py                    1.00    129.9±0.98µs    22.7 MB/sec    1.01    131.2±0.62µs    22.5 MB/sec
parser/pydantic/types.py                   1.00      2.8±0.01ms     9.0 MB/sec    1.00      2.8±0.01ms     9.0 MB/sec

else if splat_element.is_list_expr() || splat_element.is_tuple_expr() {
new_elts = other_elements.clone();

let mut elts = match splat_element {
Copy link
Member

Choose a reason for hiding this comment

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

How would this deal with (1,) + [2] or [1] + (2,)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running ruff on a file with:

a = (1,) + [2]
b = (1, 2, 3) + (4,)
c = (7, 8, 9) + b

The current version outputs a warning only for the last line, whereas the PR in its current state outputs a warning for all three lines. While a warning on the first line is clearly undesired (that's a typing error), should the one on the second line be kept ?

@konstin konstin requested a review from MichaReiser May 22, 2023 13:26
@charliermarsh
Copy link
Member

Do you mind adding some information to the PR summary around what needed to change, and why?

@hoel-bagard
Copy link
Contributor Author

To be honest I'm not sure I went about it the right way, so if you think that there is a better way to solve the issue I don't mind redoing it another way or trying to tackle a different issue.

On another note, I have a question about the formatting of the test fixture. The following test always gets formatted by black during the pre-commit verify:

foo + [  # This will be preserved, but doesn't prevent the fix
]

Should I remove this test (and maybe include a replacement one), or if it better to use --no-verify when making a commit modifying the test fixture file ?

…ion.rs

Co-authored-by: Micha Reiser <micha@reiser.io>
@konstin
Copy link
Member

konstin commented May 23, 2023

Could you check with checker.semantic_model().expr_parent() if we already generated a diagnostic and fix for the parent node and then omit the diagnostic for the current node? https://github.com/charliermarsh/ruff/blob/74effb40b965ea99f92d5096a49a17bbfaf34add/crates/ruff/src/checkers/ast/mod.rs#L1521-L1528 is an example for a similar problem

@hoel-bagard
Copy link
Contributor Author

Thank you for the suggestion, I've done that and it got rid of the unwanted warnings.

Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

This needs to be updated with the changes from main and a cargo test cargo insta review, otherwise i think it's ready

@charliermarsh
Copy link
Member

I'll take a look at this tonight and (hopefully) merge.

@charliermarsh charliermarsh changed the title Fix ruf005 Extend RUF005 to recursive and literal-literal concatenations May 24, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) May 24, 2023 01:17
@charliermarsh charliermarsh merged commit a256fdb into astral-sh:main May 24, 2023
14 checks passed
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.

Trailing added list not autofixed by RUF005
4 participants