-
Notifications
You must be signed in to change notification settings - Fork 950
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
Lint pyproject.toml #4496
Lint pyproject.toml #4496
Conversation
./resources/test/fixtures/ruff/pyproject_toml/bleach/pyproject.toml:5:16: RUF200 Failed to parse pyproject.toml: Version specifier `>=1.1.0<1.2` doesn't match PEP 440 rules | ||
tinycss2>=1.1.0<1.2 | ||
^^^^^^^^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the normal style but unfortunately serde has no concept of spans so pep440_rs/pep508_rs can't forward this to toml; i think that's the best we can do
8 | { name = "콘스턴틴", email = 1 } | ||
| ^ RUF200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opened toml-rs/toml#556
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's byte offsets indeed, confused why it's 30 chars in line 8 and 34 chars whitespaces below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look into the TextEmitter
and verify if we pass the right character positions to annotate_snippets
to know if it is a bug from us or annotate_snippets
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently the width of hangul syllables is 2, but for historic reasons there no proper hangul monospace. I've replaced the test string with something else.
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+4, -0, 0 error(s)) build (+4, -0)
+ ^
+ tests/packages/test-invalid-requirements/pyproject.toml:2:12: RUF200 Failed to parse pyproject.toml: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `i`
+ tests/packages/test-no-requires/pyproject.toml:1:1: RUF200 Failed to parse pyproject.toml: missing field `requires`
+ this is invalid
BenchmarkLinux
Windows
|
7 | dependencies = [ | ||
| ________________^ | ||
8 | | "tinycss2>=1.1.0<1.2", | ||
9 | | ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is a "bug" in the PEP440 crate. It should only return the range of the qualifier without leading and trailing whitespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's from the toml crate i think, the definition is at https://github.com/PyO3/pyproject-toml-rs/blob/e3ae25d4fa43c29351e5b6844b9428a0adb37d95/src/lib.rs#L63
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. There's another crate :) Do you think it is because how pyproject-toml-rs
creates the error or is it because the requirement range includes the whitespace too?
8 | { name = "콘스턴틴", email = 1 } | ||
| ^ RUF200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look into the TextEmitter
and verify if we pass the right character positions to annotate_snippets
to know if it is a bug from us or annotate_snippets
?
2f58df8
to
39f6ff8
Compare
This adds a new rule `InvalidPyprojectToml` that lints pyproject.toml by checking if https://github.com/PyO3/pyproject-toml-rs can parse it. This means the linting is currently very basic, e.g. we don't check whether the name is actually a valid python project name or appropriately normalized. It does catch errors e.g. with invalid dependency requirements or problems withs the license specifications. It is open to be extended in the future (validate name, SPDX expressions, classifiers, ...), either in ruff or in pyproject-toml-rs. TODOs: - [ ] Why does `FilePattern::Builtin("pyproject.toml")` alone not work? I've added `*.toml` for now to test but this should be changed before merging (help wanted) - [ ] Run this over the ecosystem CI dataset
Co-authored-by: Micha Reiser <micha@reiser.io>
39f6ff8
to
1a05901
Compare
I made Updated test plan:
This lead to a bunch of
(e.g. https://github.com/amitsk/fastapi-todos/blob/main/pyproject.toml) which is indeed invalid (https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#specification). Filtering those out, the following other problems were found by
Overall, this emitted errors in 43 out of 3408 projects ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is way less code than I expected it to be. Well done!
The ranges for the requirements is unfortunate but I don't think there's anything we can do about it. Is there?
i'm afraid not, at least not without digging deep into the toml crate |
[![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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4742 - \[`airflow`] Add AIR001: task variable name should be same as task_id arg by [@​jlaneve](https://togithub.com/jlaneve) in [astral-sh/ruff#4687 - \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection by [@​scop](https://togithub.com/scop) in [astral-sh/ruff#4504 - \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4882 - \[`flake8-fixme`] Implement `flake8_fixme` and refactor `TodoDirective` by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4681 - \[`flake8-future-annotations`] Implement `FA102` by [@​akx](https://togithub.com/akx) in [astral-sh/ruff#4702 - \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4756 - \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4764 - \[`flake8-pyi`] Add `PYI032` rule with autofix by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4695 - \[`flake8-pyi`] Add autofix for PYI010 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4634 - \[`flake8-pyi`] Implement PYI029 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4851 - \[`flake8-pyi`] Implement PYI035 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4820 - \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4645 - \[`flake8-pyi`] Implement PYI053 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4770 - \[`flake8-pyi`] Implement PYI054 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4775 - \[`flake8-pyi`] Implement `PYI025` by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4791 - \[`flake8-pyi`] Implement `PYI045` by [@​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 [@​tjkuson](https://togithub.com/tjkuson) in [astral-sh/ruff#4706 - \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4792 - \[`pylint`] Implement Pylint's `yield-inside-async-function` rule (`PLE1700`) by [@​chanman3388](https://togithub.com/chanman3388) in [astral-sh/ruff#4668 - \[`pylint`] implement E307 for pylint invalid str return type by [@​Ryang20718](https://togithub.com/Ryang20718) in [astral-sh/ruff#4854 - \[`ruff`] Lint pyproject.toml by [@​konstin](https://togithub.com/konstin) in [astral-sh/ruff#4496 - \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4797 ##### Settings - Add `pyflakes.extend-generics` setting by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4677 ##### Bug Fixes - Fix PLW3301 false positive single argument nested min/max by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4683 - Handle dotted alias imports to check for implicit imports by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4685 - Flag empty strings in flake8-errmsg rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4745 - Exclude function definition from too-many-statements rule by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4794 - Preserve quotes in F523 fixer by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4836 - Fix round-tripping of nested functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4875 - Avoid early-exit in explicit-f-string-type-conversion by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4886 - Avoid no-op fix for nested with expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4906 - Fix UP036 auto-fix error by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4679 - Use class name as range for `B024` by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4558 - Allow more immutable funcs for RUF009 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4660 - Avoid using typing-imported symbols for runtime edits by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4649 - Fix `async for` formatting by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4675 - Ignore **setattr** in FBT003 by [@​alexfikl](https://togithub.com/alexfikl) in [astral-sh/ruff#4752 - Include ImportError in non-fixable try-catch imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4793 - Avoid extra newline between diagnostics in grouped mode by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4776 - Avoid enforcing native-literals rule within nested f-strings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4488 - Respect mixed variable assignment in RET504 by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4834 - Add some exceptions for FBT003 ([#​3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in [astral-sh/ruff#4867 - Avoid running RUF100 rules when code contains syntax errors by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4869 - Avoid index-out-of-bands panic for positional placeholders by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4872 - Remove destructive fixes for F523 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4883 - Respect shadowed exports in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4885 - Track symbol deletions separately from bindings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4888 - Change fixable_set to include RuleSelector::All/Nursery by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4852 #### New Contributors - [@​bersbersbers](https://togithub.com/bersbersbers) made their first contribution in [astral-sh/ruff#4644 - [@​jlaneve](https://togithub.com/jlaneve) made their first contribution in [astral-sh/ruff#4690 - [@​suharnikov](https://togithub.com/suharnikov) made their first contribution in [astral-sh/ruff#4678 - [@​alexfikl](https://togithub.com/alexfikl) made their first contribution in [astral-sh/ruff#4752 - [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) made their first contribution in [astral-sh/ruff#4867 - [@​Ryang20718](https://togithub.com/Ryang20718) made their first contribution in [astral-sh/ruff#4854 - [@​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>
[![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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4917 ##### Rules - \[`flake8-pyi`] Implement PYI050 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4884 ##### Bug Fixes - Avoid attributing runtime references to module-level imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4942 - Skip class scopes when resolving nonlocal references by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4943 - Apply `dict.get` fix before ternary rewrite by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4944 - Handle implicit string concatenations in conversion-flag rewrites by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4947 - Make `C413` fix as suggested for `reversed` call by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4891 - ignore if using infinite iterators in `B905` by [@​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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4742 - \[`airflow`] Add AIR001: task variable name should be same as task_id arg by [@​jlaneve](https://togithub.com/jlaneve) in [astral-sh/ruff#4687 - \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection by [@​scop](https://togithub.com/scop) in [astral-sh/ruff#4504 - \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4882 - \[`flake8-fixme`] Implement `flake8_fixme` and refactor `TodoDirective` by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4681 - \[`flake8-future-annotations`] Implement `FA102` by [@​akx](https://togithub.com/akx) in [astral-sh/ruff#4702 - \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4756 - \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4764 - \[`flake8-pyi`] Add `PYI032` rule with autofix by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4695 - \[`flake8-pyi`] Add autofix for PYI010 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4634 - \[`flake8-pyi`] Implement PYI029 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4851 - \[`flake8-pyi`] Implement PYI035 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4820 - \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4645 - \[`flake8-pyi`] Implement PYI053 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4770 - \[`flake8-pyi`] Implement PYI054 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4775 - \[`flake8-pyi`] Implement `PYI025` by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4791 - \[`flake8-pyi`] Implement `PYI045` by [@​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 [@​tjkuson](https://togithub.com/tjkuson) in [astral-sh/ruff#4706 - \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4792 - \[`pylint`] Implement Pylint's `yield-inside-async-function` rule (`PLE1700`) by [@​chanman3388](https://togithub.com/chanman3388) in [astral-sh/ruff#4668 - \[`pylint`] implement E307 for pylint invalid str return type by [@​Ryang20718](https://togithub.com/Ryang20718) in [astral-sh/ruff#4854 - \[`ruff`] Lint pyproject.toml by [@​konstin](https://togithub.com/konstin) in [astral-sh/ruff#4496 - \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4797 ##### Settings - Add `pyflakes.extend-generics` setting by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4677 ##### Bug Fixes - Fix PLW3301 false positive single argument nested min/max by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4683 - Handle dotted alias imports to check for implicit imports by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4685 - Flag empty strings in flake8-errmsg rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4745 - Exclude function definition from too-many-statements rule by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4794 - Preserve quotes in F523 fixer by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4836 - Fix round-tripping of nested functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4875 - Avoid early-exit in explicit-f-string-type-conversion by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4886 - Avoid no-op fix for nested with expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4906 - Fix UP036 auto-fix error by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4679 - Use class name as range for `B024` by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4558 - Allow more immutable funcs for RUF009 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4660 - Avoid using typing-imported symbols for runtime edits by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4649 - Fix `async for` formatting by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4675 - Ignore **setattr** in FBT003 by [@​alexfikl](https://togithub.com/alexfikl) in [astral-sh/ruff#4752 - Include ImportError in non-fixable try-catch imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4793 - Avoid extra newline between diagnostics in grouped mode by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4776 - Avoid enforcing native-literals rule within nested f-strings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4488 - Respect mixed variable assignment in RET504 by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4834 - Add some exceptions for FBT003 ([#​3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in [astral-sh/ruff#4867 - Avoid running RUF100 rules when code contains syntax errors by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4869 - Avoid index-out-of-bands panic for positional placeholders by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4872 - Remove destructive fixes for F523 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4883 - Respect shadowed exports in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4885 - Track symbol deletions separately from bindings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4888 - Change fixable_set to include RuleSelector::All/Nursery by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4852 #### New Contributors - [@​bersbersbers](https://togithub.com/bersbersbers) made their first contribution in [astral-sh/ruff#4644 - [@​jlaneve](https://togithub.com/jlaneve) made their first contribution in [astral-sh/ruff#4690 - [@​suharnikov](https://togithub.com/suharnikov) made their first contribution in [astral-sh/ruff#4678 - [@​alexfikl](https://togithub.com/alexfikl) made their first contribution in [astral-sh/ruff#4752 - [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) made their first contribution in [astral-sh/ruff#4867 - [@​Ryang20718](https://togithub.com/Ryang20718) made their first contribution in [astral-sh/ruff#4854 - [@​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-->
[![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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4917 ##### Rules - \[`flake8-pyi`] Implement PYI050 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4884 ##### Bug Fixes - Avoid attributing runtime references to module-level imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4942 - Skip class scopes when resolving nonlocal references by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4943 - Apply `dict.get` fix before ternary rewrite by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4944 - Handle implicit string concatenations in conversion-flag rewrites by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4947 - Make `C413` fix as suggested for `reversed` call by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4891 - ignore if using infinite iterators in `B905` by [@​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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4742 - \[`airflow`] Add AIR001: task variable name should be same as task_id arg by [@​jlaneve](https://togithub.com/jlaneve) in [astral-sh/ruff#4687 - \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection by [@​scop](https://togithub.com/scop) in [astral-sh/ruff#4504 - \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4882 - \[`flake8-fixme`] Implement `flake8_fixme` and refactor `TodoDirective` by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4681 - \[`flake8-future-annotations`] Implement `FA102` by [@​akx](https://togithub.com/akx) in [astral-sh/ruff#4702 - \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4756 - \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4764 - \[`flake8-pyi`] Add `PYI032` rule with autofix by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4695 - \[`flake8-pyi`] Add autofix for PYI010 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4634 - \[`flake8-pyi`] Implement PYI029 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4851 - \[`flake8-pyi`] Implement PYI035 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4820 - \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4645 - \[`flake8-pyi`] Implement PYI053 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4770 - \[`flake8-pyi`] Implement PYI054 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4775 - \[`flake8-pyi`] Implement `PYI025` by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4791 - \[`flake8-pyi`] Implement `PYI045` by [@​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 [@​tjkuson](https://togithub.com/tjkuson) in [astral-sh/ruff#4706 - \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4792 - \[`pylint`] Implement Pylint's `yield-inside-async-function` rule (`PLE1700`) by [@​chanman3388](https://togithub.com/chanman3388) in [astral-sh/ruff#4668 - \[`pylint`] implement E307 for pylint invalid str return type by [@​Ryang20718](https://togithub.com/Ryang20718) in [astral-sh/ruff#4854 - \[`ruff`] Lint pyproject.toml by [@​konstin](https://togithub.com/konstin) in [astral-sh/ruff#4496 - \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4797 ##### Settings - Add `pyflakes.extend-generics` setting by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4677 ##### Bug Fixes - Fix PLW3301 false positive single argument nested min/max by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4683 - Handle dotted alias imports to check for implicit imports by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4685 - Flag empty strings in flake8-errmsg rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4745 - Exclude function definition from too-many-statements rule by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4794 - Preserve quotes in F523 fixer by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4836 - Fix round-tripping of nested functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4875 - Avoid early-exit in explicit-f-string-type-conversion by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4886 - Avoid no-op fix for nested with expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4906 - Fix UP036 auto-fix error by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4679 - Use class name as range for `B024` by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4558 - Allow more immutable funcs for RUF009 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4660 - Avoid using typing-imported symbols for runtime edits by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4649 - Fix `async for` formatting by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4675 - Ignore **setattr** in FBT003 by [@​alexfikl](https://togithub.com/alexfikl) in [astral-sh/ruff#4752 - Include ImportError in non-fixable try-catch imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4793 - Avoid extra newline between diagnostics in grouped mode by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4776 - Avoid enforcing native-literals rule within nested f-strings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4488 - Respect mixed variable assignment in RET504 by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4834 - Add some exceptions for FBT003 ([#​3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in [astral-sh/ruff#4867 - Avoid running RUF100 rules when code contains syntax errors by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4869 - Avoid index-out-of-bands panic for positional placeholders by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4872 - Remove destructive fixes for F523 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4883 - Respect shadowed exports in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4885 - Track symbol deletions separately from bindings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4888 - Change fixable_set to include RuleSelector::All/Nursery by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4852 #### New Contributors - [@​bersbersbers](https://togithub.com/bersbersbers) made their first contribution in [astral-sh/ruff#4644 - [@​jlaneve](https://togithub.com/jlaneve) made their first contribution in [astral-sh/ruff#4690 - [@​suharnikov](https://togithub.com/suharnikov) made their first contribution in [astral-sh/ruff#4678 - [@​alexfikl](https://togithub.com/alexfikl) made their first contribution in [astral-sh/ruff#4752 - [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) made their first contribution in [astral-sh/ruff#4867 - [@​Ryang20718](https://togithub.com/Ryang20718) made their first contribution in [astral-sh/ruff#4854 - [@​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>
[![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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4917 ##### Rules - \[`flake8-pyi`] Implement PYI050 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4884 ##### Bug Fixes - Avoid attributing runtime references to module-level imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4942 - Skip class scopes when resolving nonlocal references by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4943 - Apply `dict.get` fix before ternary rewrite by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4944 - Handle implicit string concatenations in conversion-flag rewrites by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4947 - Make `C413` fix as suggested for `reversed` call by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4891 - ignore if using infinite iterators in `B905` by [@​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 [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4742 - \[`airflow`] Add AIR001: task variable name should be same as task_id arg by [@​jlaneve](https://togithub.com/jlaneve) in [astral-sh/ruff#4687 - \[`flake8-bandit`] Implement S609, linux_commands_wildcard_injection by [@​scop](https://togithub.com/scop) in [astral-sh/ruff#4504 - \[`flake8-bugbear`] Move duplicate-value rule to flake8-bugbear by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4882 - \[`flake8-fixme`] Implement `flake8_fixme` and refactor `TodoDirective` by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4681 - \[`flake8-future-annotations`] Implement `FA102` by [@​akx](https://togithub.com/akx) in [astral-sh/ruff#4702 - \[`flake8-pyi`] Add PYI024 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4756 - \[`flake8-pyi`] Add PYI034 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4764 - \[`flake8-pyi`] Add `PYI032` rule with autofix by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4695 - \[`flake8-pyi`] Add autofix for PYI010 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4634 - \[`flake8-pyi`] Implement PYI029 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4851 - \[`flake8-pyi`] Implement PYI035 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4820 - \[`flake8-pyi`] Implement PYI048 for `flake8-pyi` plugin by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4645 - \[`flake8-pyi`] Implement PYI053 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4770 - \[`flake8-pyi`] Implement PYI054 by [@​density](https://togithub.com/density) in [astral-sh/ruff#4775 - \[`flake8-pyi`] Implement `PYI025` by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4791 - \[`flake8-pyi`] Implement `PYI045` by [@​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 [@​tjkuson](https://togithub.com/tjkuson) in [astral-sh/ruff#4706 - \[`pylint`] Add autofix for `PLR1701` (repeated-isinstance-calls) by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4792 - \[`pylint`] Implement Pylint's `yield-inside-async-function` rule (`PLE1700`) by [@​chanman3388](https://togithub.com/chanman3388) in [astral-sh/ruff#4668 - \[`pylint`] implement E307 for pylint invalid str return type by [@​Ryang20718](https://togithub.com/Ryang20718) in [astral-sh/ruff#4854 - \[`ruff`] Lint pyproject.toml by [@​konstin](https://togithub.com/konstin) in [astral-sh/ruff#4496 - \[`tryceratops`] Ignore error calls with `exc_info` in TRY400 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4797 ##### Settings - Add `pyflakes.extend-generics` setting by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4677 ##### Bug Fixes - Fix PLW3301 false positive single argument nested min/max by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4683 - Handle dotted alias imports to check for implicit imports by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [astral-sh/ruff#4685 - Flag empty strings in flake8-errmsg rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4745 - Exclude function definition from too-many-statements rule by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4794 - Preserve quotes in F523 fixer by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4836 - Fix round-tripping of nested functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4875 - Avoid early-exit in explicit-f-string-type-conversion by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4886 - Avoid no-op fix for nested with expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4906 - Fix UP036 auto-fix error by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [astral-sh/ruff#4679 - Use class name as range for `B024` by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4558 - Allow more immutable funcs for RUF009 by [@​qdegraaf](https://togithub.com/qdegraaf) in [astral-sh/ruff#4660 - Avoid using typing-imported symbols for runtime edits by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4649 - Fix `async for` formatting by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4675 - Ignore **setattr** in FBT003 by [@​alexfikl](https://togithub.com/alexfikl) in [astral-sh/ruff#4752 - Include ImportError in non-fixable try-catch imports by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4793 - Avoid extra newline between diagnostics in grouped mode by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4776 - Avoid enforcing native-literals rule within nested f-strings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4488 - Respect mixed variable assignment in RET504 by [@​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 [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4834 - Add some exceptions for FBT003 ([#​3247](https://togithub.com/charliermarsh/ruff/issues/3247)) by [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) in [astral-sh/ruff#4867 - Avoid running RUF100 rules when code contains syntax errors by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4869 - Avoid index-out-of-bands panic for positional placeholders by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4872 - Remove destructive fixes for F523 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4883 - Respect shadowed exports in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4885 - Track symbol deletions separately from bindings by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#4888 - Change fixable_set to include RuleSelector::All/Nursery by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [astral-sh/ruff#4852 #### New Contributors - [@​bersbersbers](https://togithub.com/bersbersbers) made their first contribution in [astral-sh/ruff#4644 - [@​jlaneve](https://togithub.com/jlaneve) made their first contribution in [astral-sh/ruff#4690 - [@​suharnikov](https://togithub.com/suharnikov) made their first contribution in [astral-sh/ruff#4678 - [@​alexfikl](https://togithub.com/alexfikl) made their first contribution in [astral-sh/ruff#4752 - [@​allisonkarlitskaya](https://togithub.com/allisonkarlitskaya) made their first contribution in [astral-sh/ruff#4867 - [@​Ryang20718](https://togithub.com/Ryang20718) made their first contribution in [astral-sh/ruff#4854 - [@​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>
This adds a new rule
InvalidPyprojectToml
that lints pyproject.toml by checking if https://github.com/PyO3/pyproject-toml-rs can parse it. This means the linting is currently very basic, e.g. we don't check whether the name is actually a valid python project name or appropriately normalized. It does catch errors e.g. with invalid dependency requirements or problems withs the license specifications. It is open to be extended in the future (validate name, SPDX expressions, classifiers, ...), either in ruff or in pyproject-toml-rs.TODOs:
FilePattern::Builtin("pyproject.toml")
alone not work? I've added*.toml
for now to test but this should be changed before merging. Edit: Because it matches as a glob against entire paths