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

Allow more immutable funcs for RUF009 #4660

Merged
merged 4 commits into from May 26, 2023
Merged

Allow more immutable funcs for RUF009 #4660

merged 4 commits into from May 26, 2023

Conversation

qdegraaf
Copy link
Contributor

@qdegraaf qdegraaf commented May 25, 2023

Summary

RUF009 wrongly flags on float("-inf") calls. As discussed in #4657 we can take this moment to add more funcs with immutable results.

TODOs:

  • Check for completeness of added funcs
  • @charliermarsh to confirm that we are sure we want to allow these funcs in flake8_bugbear as well (as discussed in the issue). The tests for bugbear seem quite explicit about only allowing certain float() calls for example. If changed Ruff would appear to deviate from upstream implementation. Which might be desirable in this case, but if not, PR can be changed to add a separate constant for RUF009.

Test Plan

Cases added to RUF009.py
Test TODOs:

  • Change comments in flake8_bugbear tests if we end up editing its logic

Closes: #4657

@github-actions
Copy link

github-actions bot commented May 25, 2023

PR Check Results

Ecosystem

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

airflow (+0, -1)

- setup.py:208:35: B008 Do not perform function call `str` in argument defaults

Rules changed: 1
Rule Changes Additions Removals
B008 1 0 1

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.01     20.6±0.71ms  2026.0 KB/sec    1.00     20.3±0.64ms     2.0 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.7±0.16ms     3.6 MB/sec    1.01      4.7±0.18ms     3.5 MB/sec
linter/all-rules/numpy/globals.py          1.01   589.6±26.13µs     5.0 MB/sec    1.00   583.3±25.98µs     5.1 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.3±0.39ms     3.1 MB/sec    1.00      8.3±0.34ms     3.1 MB/sec
linter/default-rules/large/dataset.py      1.01      9.5±0.36ms     4.3 MB/sec    1.00      9.4±0.33ms     4.3 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.02      2.1±0.07ms     8.1 MB/sec    1.00      2.0±0.11ms     8.3 MB/sec
linter/default-rules/numpy/globals.py      1.03   239.0±10.83µs    12.3 MB/sec    1.00   233.2±11.11µs    12.7 MB/sec
linter/default-rules/pydantic/types.py     1.04      4.3±0.18ms     5.9 MB/sec    1.00      4.2±0.16ms     6.1 MB/sec
parser/large/dataset.py                    1.00      7.3±0.20ms     5.6 MB/sec    1.04      7.6±0.23ms     5.4 MB/sec
parser/numpy/ctypeslib.py                  1.00  1438.2±53.12µs    11.6 MB/sec    1.04  1495.4±89.18µs    11.1 MB/sec
parser/numpy/globals.py                    1.00    146.2±8.63µs    20.2 MB/sec    1.00    146.0±6.72µs    20.2 MB/sec
parser/pydantic/types.py                   1.01      3.3±0.16ms     7.8 MB/sec    1.00      3.2±0.10ms     7.9 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.02     17.3±0.75ms     2.4 MB/sec    1.00     16.9±0.31ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.04      4.4±0.11ms     3.8 MB/sec    1.00      4.2±0.05ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.01   515.4±19.61µs     5.7 MB/sec    1.00   510.0±11.65µs     5.8 MB/sec
linter/all-rules/pydantic/types.py         1.04      7.3±0.15ms     3.5 MB/sec    1.00      7.0±0.10ms     3.6 MB/sec
linter/default-rules/large/dataset.py      1.00      8.5±0.12ms     4.8 MB/sec    1.00      8.6±0.21ms     4.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.02  1826.3±63.12µs     9.1 MB/sec    1.00  1791.3±50.20µs     9.3 MB/sec
linter/default-rules/numpy/globals.py      1.00    211.3±9.30µs    14.0 MB/sec    1.01   214.2±14.84µs    13.8 MB/sec
linter/default-rules/pydantic/types.py     1.01      4.0±0.13ms     6.4 MB/sec    1.00      3.9±0.13ms     6.5 MB/sec
parser/large/dataset.py                    1.00      6.5±0.09ms     6.2 MB/sec    1.00      6.5±0.10ms     6.2 MB/sec
parser/numpy/ctypeslib.py                  1.00  1242.7±21.93µs    13.4 MB/sec    1.01  1251.9±41.24µs    13.3 MB/sec
parser/numpy/globals.py                    1.00    126.3±3.82µs    23.4 MB/sec    1.01    127.5±4.31µs    23.1 MB/sec
parser/pydantic/types.py                   1.00      2.8±0.06ms     9.1 MB/sec    1.00      2.8±0.05ms     9.1 MB/sec

@charliermarsh
Copy link
Member

Oh, this is interesting, I didn't realize we had special-casing for those floats... How would you feel about instead changing our other rules to respect that same carveout?

@qdegraaf
Copy link
Contributor Author

Oh, this is interesting, I didn't realize we had special-casing for those floats... How would you feel about instead changing our other rules to respect that same carveout?

I would be happy to! Just for my understanding, and to be complete, to what degree does this apply to other primitive Python functions? The original flake8-bugbear rule states:

"B008 Do not perform function calls in argument defaults. The call is "
"performed only once at function definition time. All calls to your "
"function will reuse the result of that definition-time function call. If "
"this is intended, assign the function call to a module-level variable and "
"use that variable as a default value."

So I take it calling float("-inf") or a similar infinite value avoids this necessity somehow.

Essentially what I am wondering is: if the following default args are ok, and they do not need to be moved to module vars:

def foo(x: float = float("-inf"), y: typing.Tuple[int] = tuple(1,2)):
    ...

why do these need to be moved (according to bugbear)?

def bar(x: str = str("bla"), y: int = int(42)):
    ...

As far as I understand these primitives, they all create immutable values that are fine to be reused (or as fine as their allowed counterparts). I'm assuming it's not an oversight in bugbear or here, so I'm just checking so I can understand what the difference is and I can be certain I'm not adding or removing the wrong function to either RUF or B

@charliermarsh
Copy link
Member

So in this case, I'd go to the source and try to find a record of why / how the decision was made...

In this case, I found PyCQA/flake8-bugbear#155 and PyCQA/flake8-bugbear#154. It sounds like originally, bugbear didn't allow any float calls (even float("-inf") or similar). The issue was raised to support those cases, since they don't have corresponding literal definitions, and they made the choice to be conservative, and only support cases for which there aren't corresponding literals. E.g., x: float = float("5") is fine, but odd (why not use a literal?), and so why allow it?

I'm fine with either decision... Having looked at the source issue, I guess I'm leaning towards allowing arbitrary int, float, etc., calls, since they do produce immutable values, and if we want to suggest that users should use 5.0 instead of float("5.0"), that feels like it could be the responsibility of a separate rule, if needed.

@qdegraaf
Copy link
Contributor Author

Ah nice find, thanks for the effort. Don't know why I just assumed it was a Python thing and not a bugbear design choice. Will do some more digging before throwing questions up for any future plugin port confusion.

I agree with leaning towards allowing all immutable func calls, for the reasons you stated, as well as avoiding any similar confusion someone might have in the future. If you're happy to deviate from upstream implementation I can add some more immutable funcs, will tweak the bugbear tests and double-check both RUF and B. I can make a spinoff issue for implementing the separate rule for the 5.0 instead of float("5.0") etc. as well if it seems useful,

@qdegraaf qdegraaf marked this pull request as draft May 26, 2023 18:33
158 | pass
|

B006_B008.py:162:30: B008 Do not perform function call `float` in argument defaults
Copy link
Member

Choose a reason for hiding this comment

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

We should probably update these comments, they're not out-of-date, I think? (Can we also remove the special-casing code in the bugbear module, which should now be redundant?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I follow exactly on the comments. We settled on allowing float calls now right? So these snapshots can go.

I updated the comments in the .py fixture to reflect this. As for the Violating string it's formatted like so:

format!("Do not perform function call `{name}` in argument defaults")

So this needs no edit. Does that cover what you mean or are you referring to something else.

As for the special casing float logic, I'm removing it now!

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I meant "they're out-of-date", not "they're not out-of-date". What you've done here looks correct to me.

Copy link
Contributor Author

@qdegraaf qdegraaf May 26, 2023

Choose a reason for hiding this comment

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

Ah check, all good! Removed infinity/nan logic now as well.

@qdegraaf qdegraaf marked this pull request as ready for review May 26, 2023 19:13
@charliermarsh charliermarsh merged commit ccca118 into astral-sh:main May 26, 2023
14 checks passed
@charliermarsh
Copy link
Member

LGTM, thanks!

renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Jun 7, 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.270` -> `^0.0.271` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.271/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.271/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.271/compatibility-slim/0.0.270)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.271/confidence-slim/0.0.270)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Rules

- Add autofix for flake8-type-checking by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4742
- \[`airflow`] Add AIR001: task variable name should be same as task_id
arg by [@&#8203;jlaneve](https://togithub.com/jlaneve) in
[astral-sh/ruff#4687
- \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection
by [@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4504
- \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4882
- \[`flake8-fixme`] Implement `flake8_fixme` and refactor
`TodoDirective` by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4681
- \[`flake8-future-annotations`] Implement `FA102` by
[@&#8203;akx](https://togithub.com/akx) in
[astral-sh/ruff#4702
- \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4756
- \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4764
- \[`flake8-pyi`] Add `PYI032` rule with autofix by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4695
- \[`flake8-pyi`] Add autofix for PYI010 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4634
- \[`flake8-pyi`] Implement PYI029 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4851
- \[`flake8-pyi`] Implement PYI035 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4820
- \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4645
- \[`flake8-pyi`] Implement PYI053 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4770
- \[`flake8-pyi`] Implement PYI054 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4775
- \[`flake8-pyi`] Implement `PYI025` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4791
- \[`flake8-pyi`] Implement `PYI045` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4700
- \[`pylint`] Add Pylint rule `C0208` (`use-sequence-for-iteration`) as
`PLC0208` (`iteration-over-set`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#4706
- \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4792
- \[`pylint`] Implement Pylint's `yield-inside-async-function` rule
(`PLE1700`) by [@&#8203;chanman3388](https://togithub.com/chanman3388)
in
[astral-sh/ruff#4668
- \[`pylint`] implement E307 for pylint invalid str return type by
[@&#8203;Ryang20718](https://togithub.com/Ryang20718) in
[astral-sh/ruff#4854
- \[`ruff`] Lint pyproject.toml by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#4496
- \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4797

##### Settings

- Add `pyflakes.extend-generics` setting by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4677

##### Bug Fixes

- Fix PLW3301 false positive single argument nested min/max by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4683
- Handle dotted alias imports to check for implicit imports by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4685
- Flag empty strings in flake8-errmsg rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4745
- Exclude function definition from too-many-statements rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4794
- Preserve quotes in F523 fixer by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4836
- Fix round-tripping of nested functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4875
- Avoid early-exit in explicit-f-string-type-conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4886
- Avoid no-op fix for nested with expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4906
- Fix UP036 auto-fix error by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4679
- Use class name as range for `B024` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4647
- Change TODO directive detection to work with multiple pound signs on
the same line by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4558
- Allow more immutable funcs for RUF009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4660
- Avoid using typing-imported symbols for runtime edits by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4649
- Fix `async for` formatting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4675
- Ignore **setattr** in FBT003 by
[@&#8203;alexfikl](https://togithub.com/alexfikl) in
[astral-sh/ruff#4752
- Include ImportError in non-fixable try-catch imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4793
- Avoid extra newline between diagnostics in grouped mode by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4776
- Avoid enforcing native-literals rule within nested f-strings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4488
- Respect mixed variable assignment in RET504 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4835
- Make FLY002 autofix into a constant string instead of an f-string if
all `join()` arguments are strings by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4834
- Add some exceptions for FBT003
([#&#8203;3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by
[@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in
[astral-sh/ruff#4867
- Avoid running RUF100 rules when code contains syntax errors by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4869
- Avoid index-out-of-bands panic for positional placeholders by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4872
- Remove destructive fixes for F523 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4883
- Respect shadowed exports in `__all__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4885
- Track symbol deletions separately from bindings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4888
- Change fixable_set to include RuleSelector::All/Nursery by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4852

#### New Contributors

- [@&#8203;bersbersbers](https://togithub.com/bersbersbers) made their
first contribution in
[astral-sh/ruff#4644
- [@&#8203;jlaneve](https://togithub.com/jlaneve) made their first
contribution in
[astral-sh/ruff#4690
- [@&#8203;suharnikov](https://togithub.com/suharnikov) made their first
contribution in
[astral-sh/ruff#4678
- [@&#8203;alexfikl](https://togithub.com/alexfikl) made their first
contribution in
[astral-sh/ruff#4752
- [@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya)
made their first contribution in
[astral-sh/ruff#4867
- [@&#8203;Ryang20718](https://togithub.com/Ryang20718) made their first
contribution in
[astral-sh/ruff#4854
- [@&#8203;addisoncrump](https://togithub.com/addisoncrump) made their
first contribution in
[astral-sh/ruff#4893

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

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jankatins added a commit to jankatins/pr-workflow-example that referenced this pull request Jun 8, 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.270` -> `0.0.272` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/compatibility-slim/0.0.270)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/confidence-slim/0.0.270)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Breaking Changes

- Move flake8-fixme rules to FIX prefix by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4917

##### Rules

- \[`flake8-pyi`] Implement PYI050 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4884

##### Bug Fixes

- Avoid attributing runtime references to module-level imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4942
- Skip class scopes when resolving nonlocal references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4943
- Apply `dict.get` fix before ternary rewrite by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4944
- Handle implicit string concatenations in conversion-flag rewrites by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4947
- Make `C413` fix as suggested for `reversed` call by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4891
- ignore if using infinite iterators in `B905` by
[@&#8203;kyoto7250](https://togithub.com/kyoto7250) in
[astral-sh/ruff#4914

**Full Changelog**:
astral-sh/ruff@v0.0.271...v0.0.272

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

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

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

#### What's Changed

##### Rules

- Add autofix for flake8-type-checking by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4742
- \[`airflow`] Add AIR001: task variable name should be same as task_id
arg by [@&#8203;jlaneve](https://togithub.com/jlaneve) in
[astral-sh/ruff#4687
- \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection
by [@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4504
- \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4882
- \[`flake8-fixme`] Implement `flake8_fixme` and refactor
`TodoDirective` by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4681
- \[`flake8-future-annotations`] Implement `FA102` by
[@&#8203;akx](https://togithub.com/akx) in
[astral-sh/ruff#4702
- \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4756
- \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4764
- \[`flake8-pyi`] Add `PYI032` rule with autofix by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4695
- \[`flake8-pyi`] Add autofix for PYI010 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4634
- \[`flake8-pyi`] Implement PYI029 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4851
- \[`flake8-pyi`] Implement PYI035 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4820
- \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4645
- \[`flake8-pyi`] Implement PYI053 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4770
- \[`flake8-pyi`] Implement PYI054 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4775
- \[`flake8-pyi`] Implement `PYI025` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4791
- \[`flake8-pyi`] Implement `PYI045` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4700
- \[`pylint`] Add Pylint rule `C0208` (`use-sequence-for-iteration`) as
`PLC0208` (`iteration-over-set`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#4706
- \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4792
- \[`pylint`] Implement Pylint's `yield-inside-async-function` rule
(`PLE1700`) by [@&#8203;chanman3388](https://togithub.com/chanman3388)
in
[astral-sh/ruff#4668
- \[`pylint`] implement E307 for pylint invalid str return type by
[@&#8203;Ryang20718](https://togithub.com/Ryang20718) in
[astral-sh/ruff#4854
- \[`ruff`] Lint pyproject.toml by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#4496
- \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4797

##### Settings

- Add `pyflakes.extend-generics` setting by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4677

##### Bug Fixes

- Fix PLW3301 false positive single argument nested min/max by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4683
- Handle dotted alias imports to check for implicit imports by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4685
- Flag empty strings in flake8-errmsg rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4745
- Exclude function definition from too-many-statements rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4794
- Preserve quotes in F523 fixer by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4836
- Fix round-tripping of nested functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4875
- Avoid early-exit in explicit-f-string-type-conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4886
- Avoid no-op fix for nested with expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4906
- Fix UP036 auto-fix error by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4679
- Use class name as range for `B024` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4647
- Change TODO directive detection to work with multiple pound signs on
the same line by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4558
- Allow more immutable funcs for RUF009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4660
- Avoid using typing-imported symbols for runtime edits by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4649
- Fix `async for` formatting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4675
- Ignore **setattr** in FBT003 by
[@&#8203;alexfikl](https://togithub.com/alexfikl) in
[astral-sh/ruff#4752
- Include ImportError in non-fixable try-catch imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4793
- Avoid extra newline between diagnostics in grouped mode by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4776
- Avoid enforcing native-literals rule within nested f-strings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4488
- Respect mixed variable assignment in RET504 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4835
- Make FLY002 autofix into a constant string instead of an f-string if
all `join()` arguments are strings by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4834
- Add some exceptions for FBT003
([#&#8203;3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by
[@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in
[astral-sh/ruff#4867
- Avoid running RUF100 rules when code contains syntax errors by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4869
- Avoid index-out-of-bands panic for positional placeholders by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4872
- Remove destructive fixes for F523 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4883
- Respect shadowed exports in `__all__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4885
- Track symbol deletions separately from bindings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4888
- Change fixable_set to include RuleSelector::All/Nursery by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4852

#### New Contributors

- [@&#8203;bersbersbers](https://togithub.com/bersbersbers) made their
first contribution in
[astral-sh/ruff#4644
- [@&#8203;jlaneve](https://togithub.com/jlaneve) made their first
contribution in
[astral-sh/ruff#4690
- [@&#8203;suharnikov](https://togithub.com/suharnikov) made their first
contribution in
[astral-sh/ruff#4678
- [@&#8203;alexfikl](https://togithub.com/alexfikl) made their first
contribution in
[astral-sh/ruff#4752
- [@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya)
made their first contribution in
[astral-sh/ruff#4867
- [@&#8203;Ryang20718](https://togithub.com/Ryang20718) made their first
contribution in
[astral-sh/ruff#4854
- [@&#8203;addisoncrump](https://togithub.com/addisoncrump) made their
first contribution in
[astral-sh/ruff#4893

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

</details>

---

### Configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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/jankatins/pr-workflow-example).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
renovate bot added a commit to allenporter/flux-local that referenced this pull request Jun 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://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`==0.0.270` -> `==0.0.272` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/compatibility-slim/0.0.270)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.272/confidence-slim/0.0.270)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Breaking Changes

- Move flake8-fixme rules to FIX prefix by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4917

##### Rules

- \[`flake8-pyi`] Implement PYI050 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4884

##### Bug Fixes

- Avoid attributing runtime references to module-level imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4942
- Skip class scopes when resolving nonlocal references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4943
- Apply `dict.get` fix before ternary rewrite by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4944
- Handle implicit string concatenations in conversion-flag rewrites by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4947
- Make `C413` fix as suggested for `reversed` call by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4891
- ignore if using infinite iterators in `B905` by
[@&#8203;kyoto7250](https://togithub.com/kyoto7250) in
[astral-sh/ruff#4914

**Full Changelog**:
astral-sh/ruff@v0.0.271...v0.0.272

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

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

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

#### What's Changed

##### Rules

- Add autofix for flake8-type-checking by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4742
- \[`airflow`] Add AIR001: task variable name should be same as task_id
arg by [@&#8203;jlaneve](https://togithub.com/jlaneve) in
[astral-sh/ruff#4687
- \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection
by [@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4504
- \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4882
- \[`flake8-fixme`] Implement `flake8_fixme` and refactor
`TodoDirective` by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4681
- \[`flake8-future-annotations`] Implement `FA102` by
[@&#8203;akx](https://togithub.com/akx) in
[astral-sh/ruff#4702
- \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4756
- \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4764
- \[`flake8-pyi`] Add `PYI032` rule with autofix by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4695
- \[`flake8-pyi`] Add autofix for PYI010 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4634
- \[`flake8-pyi`] Implement PYI029 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4851
- \[`flake8-pyi`] Implement PYI035 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4820
- \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4645
- \[`flake8-pyi`] Implement PYI053 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4770
- \[`flake8-pyi`] Implement PYI054 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4775
- \[`flake8-pyi`] Implement `PYI025` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4791
- \[`flake8-pyi`] Implement `PYI045` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4700
- \[`pylint`] Add Pylint rule `C0208` (`use-sequence-for-iteration`) as
`PLC0208` (`iteration-over-set`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#4706
- \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4792
- \[`pylint`] Implement Pylint's `yield-inside-async-function` rule
(`PLE1700`) by [@&#8203;chanman3388](https://togithub.com/chanman3388)
in
[astral-sh/ruff#4668
- \[`pylint`] implement E307 for pylint invalid str return type by
[@&#8203;Ryang20718](https://togithub.com/Ryang20718) in
[astral-sh/ruff#4854
- \[`ruff`] Lint pyproject.toml by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#4496
- \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4797

##### Settings

- Add `pyflakes.extend-generics` setting by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4677

##### Bug Fixes

- Fix PLW3301 false positive single argument nested min/max by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4683
- Handle dotted alias imports to check for implicit imports by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4685
- Flag empty strings in flake8-errmsg rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4745
- Exclude function definition from too-many-statements rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4794
- Preserve quotes in F523 fixer by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4836
- Fix round-tripping of nested functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4875
- Avoid early-exit in explicit-f-string-type-conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4886
- Avoid no-op fix for nested with expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4906
- Fix UP036 auto-fix error by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4679
- Use class name as range for `B024` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4647
- Change TODO directive detection to work with multiple pound signs on
the same line by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4558
- Allow more immutable funcs for RUF009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4660
- Avoid using typing-imported symbols for runtime edits by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4649
- Fix `async for` formatting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4675
- Ignore **setattr** in FBT003 by
[@&#8203;alexfikl](https://togithub.com/alexfikl) in
[astral-sh/ruff#4752
- Include ImportError in non-fixable try-catch imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4793
- Avoid extra newline between diagnostics in grouped mode by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4776
- Avoid enforcing native-literals rule within nested f-strings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4488
- Respect mixed variable assignment in RET504 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4835
- Make FLY002 autofix into a constant string instead of an f-string if
all `join()` arguments are strings by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4834
- Add some exceptions for FBT003
([#&#8203;3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by
[@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in
[astral-sh/ruff#4867
- Avoid running RUF100 rules when code contains syntax errors by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4869
- Avoid index-out-of-bands panic for positional placeholders by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4872
- Remove destructive fixes for F523 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4883
- Respect shadowed exports in `__all__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4885
- Track symbol deletions separately from bindings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4888
- Change fixable_set to include RuleSelector::All/Nursery by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4852

#### New Contributors

- [@&#8203;bersbersbers](https://togithub.com/bersbersbers) made their
first contribution in
[astral-sh/ruff#4644
- [@&#8203;jlaneve](https://togithub.com/jlaneve) made their first
contribution in
[astral-sh/ruff#4690
- [@&#8203;suharnikov](https://togithub.com/suharnikov) made their first
contribution in
[astral-sh/ruff#4678
- [@&#8203;alexfikl](https://togithub.com/alexfikl) made their first
contribution in
[astral-sh/ruff#4752
- [@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya)
made their first contribution in
[astral-sh/ruff#4867
- [@&#8203;Ryang20718](https://togithub.com/Ryang20718) made their first
contribution in
[astral-sh/ruff#4854
- [@&#8203;addisoncrump](https://togithub.com/addisoncrump) made their
first contribution in
[astral-sh/ruff#4893

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

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

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

---

### Release Notes

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

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

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

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

#### What's Changed

##### Breaking Changes

- Move flake8-fixme rules to FIX prefix by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4917

##### Rules

- \[`flake8-pyi`] Implement PYI050 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4884

##### Bug Fixes

- Avoid attributing runtime references to module-level imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4942
- Skip class scopes when resolving nonlocal references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4943
- Apply `dict.get` fix before ternary rewrite by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4944
- Handle implicit string concatenations in conversion-flag rewrites by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4947
- Make `C413` fix as suggested for `reversed` call by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4891
- ignore if using infinite iterators in `B905` by
[@&#8203;kyoto7250](https://togithub.com/kyoto7250) in
[astral-sh/ruff#4914

**Full Changelog**:
astral-sh/ruff@v0.0.271...v0.0.272

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

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

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

#### What's Changed

##### Rules

- Add autofix for flake8-type-checking by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4742
- \[`airflow`] Add AIR001: task variable name should be same as task_id
arg by [@&#8203;jlaneve](https://togithub.com/jlaneve) in
[astral-sh/ruff#4687
- \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection
by [@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4504
- \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4882
- \[`flake8-fixme`] Implement `flake8_fixme` and refactor
`TodoDirective` by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4681
- \[`flake8-future-annotations`] Implement `FA102` by
[@&#8203;akx](https://togithub.com/akx) in
[astral-sh/ruff#4702
- \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4756
- \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4764
- \[`flake8-pyi`] Add `PYI032` rule with autofix by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4695
- \[`flake8-pyi`] Add autofix for PYI010 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4634
- \[`flake8-pyi`] Implement PYI029 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4851
- \[`flake8-pyi`] Implement PYI035 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4820
- \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4645
- \[`flake8-pyi`] Implement PYI053 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4770
- \[`flake8-pyi`] Implement PYI054 by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4775
- \[`flake8-pyi`] Implement `PYI025` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4791
- \[`flake8-pyi`] Implement `PYI045` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4700
- \[`pylint`] Add Pylint rule `C0208` (`use-sequence-for-iteration`) as
`PLC0208` (`iteration-over-set`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#4706
- \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4792
- \[`pylint`] Implement Pylint's `yield-inside-async-function` rule
(`PLE1700`) by [@&#8203;chanman3388](https://togithub.com/chanman3388)
in
[astral-sh/ruff#4668
- \[`pylint`] implement E307 for pylint invalid str return type by
[@&#8203;Ryang20718](https://togithub.com/Ryang20718) in
[astral-sh/ruff#4854
- \[`ruff`] Lint pyproject.toml by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#4496
- \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4797

##### Settings

- Add `pyflakes.extend-generics` setting by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4677

##### Bug Fixes

- Fix PLW3301 false positive single argument nested min/max by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4683
- Handle dotted alias imports to check for implicit imports by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4685
- Flag empty strings in flake8-errmsg rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4745
- Exclude function definition from too-many-statements rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4794
- Preserve quotes in F523 fixer by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4836
- Fix round-tripping of nested functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4875
- Avoid early-exit in explicit-f-string-type-conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4886
- Avoid no-op fix for nested with expressions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4906
- Fix UP036 auto-fix error by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4679
- Use class name as range for `B024` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4647
- Change TODO directive detection to work with multiple pound signs on
the same line by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4558
- Allow more immutable funcs for RUF009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4660
- Avoid using typing-imported symbols for runtime edits by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4649
- Fix `async for` formatting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4675
- Ignore **setattr** in FBT003 by
[@&#8203;alexfikl](https://togithub.com/alexfikl) in
[astral-sh/ruff#4752
- Include ImportError in non-fixable try-catch imports by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4793
- Avoid extra newline between diagnostics in grouped mode by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4776
- Avoid enforcing native-literals rule within nested f-strings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4488
- Respect mixed variable assignment in RET504 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4835
- Make FLY002 autofix into a constant string instead of an f-string if
all `join()` arguments are strings by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4834
- Add some exceptions for FBT003
([#&#8203;3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by
[@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in
[astral-sh/ruff#4867
- Avoid running RUF100 rules when code contains syntax errors by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4869
- Avoid index-out-of-bands panic for positional placeholders by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4872
- Remove destructive fixes for F523 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4883
- Respect shadowed exports in `__all__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4885
- Track symbol deletions separately from bindings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4888
- Change fixable_set to include RuleSelector::All/Nursery by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4852

#### New Contributors

- [@&#8203;bersbersbers](https://togithub.com/bersbersbers) made their
first contribution in
[astral-sh/ruff#4644
- [@&#8203;jlaneve](https://togithub.com/jlaneve) made their first
contribution in
[astral-sh/ruff#4690
- [@&#8203;suharnikov](https://togithub.com/suharnikov) made their first
contribution in
[astral-sh/ruff#4678
- [@&#8203;alexfikl](https://togithub.com/alexfikl) made their first
contribution in
[astral-sh/ruff#4752
- [@&#8203;allisonkarlitskaya](https://togithub.com/allisonkarlitskaya)
made their first contribution in
[astral-sh/ruff#4867
- [@&#8203;Ryang20718](https://togithub.com/Ryang20718) made their first
contribution in
[astral-sh/ruff#4854
- [@&#8203;addisoncrump](https://togithub.com/addisoncrump) made their
first contribution in
[astral-sh/ruff#4893

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

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

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.

RUF009 hints for float('-inf')
2 participants