mirror of https://github.com/astral-sh/ruff
13 KiB
13 KiB
Changelog 0.7.x
0.7.0
Check out the blog post for a migration guide and overview of the changes!
Breaking changes
- The pytest rules
PT001andPT023now default to omitting the decorator parentheses when there are no arguments (#12838, #13292). This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part. See the blog post for more details. - The
useless-try-exceptrule (in ourtryceratopscategory) has been recoded fromTRY302toTRY203(#13502). This ensures Ruff's code is consistent with the same rule in thetryceratopslinter. - The
lint.allow-unused-importssetting has been removed (#13677). Uselint.pyflakes.allow-unused-importsinstead.
Formatter preview style
- Normalize implicit concatenated f-string quotes per part (#13539)
Preview linter features
-
`refurb` -
`refurb`
Rule changes
-
`pylint` -
`flake8-async` -
`flake8-bugbear` -
`flake8-todos` -
`pycodestyle` -
being opened from a wider range of standard-library functions (#12959).`flake8-simplify`
CLI
- Add explanation of fixable in
--statisticscommand (#13774)
Bug fixes
-
`pyflakes` -
`flake8-use-pathlib` -
`flake8-bandit` -
`flake8-pyi`
0.7.1
Preview features
- Fix
E221andE222to flag missing or extra whitespace around==operator (#13890) - Formatter: Alternate quotes for strings inside f-strings in preview (#13860)
- Formatter: Join implicit concatenated strings when they fit on a line (#13663)
-
`pylint`
Rule changes
-
`flake8-type-checking`
Server
- Avoid indexing the workspace for single-file mode (#13770)
Bug fixes
- Make
ARG002compatible withEM101when raisingNotImplementedError(#13714)
Other changes
- Introduce more Docker tags for Ruff (similar to uv) (#13274)
0.7.2
Preview features
- Fix formatting of single with-item with trailing comment (#14005)
-
`pyupgrade`
Rule changes
- Regenerate
known_stdlibs.rswith stdlibs 2024.10.25 (#13963) -
`flake8-no-pep420`
Server
- Fix server panic when undoing an edit (#14010)
Bug fixes
- Fix issues in discovering ruff in pip build environments (#13881)
-
`flake8-type-checking` -
`flake8-type-checking`
Documentation
-
`flake8-simplify`
0.7.3
Preview features
- Formatter: Disallow single-line implicit concatenated strings (#13928)
-
`flake8-pyi` -
`flake8-simplify` -
`refurb` -
`ruff`
Rule changes
- Detect items that hash to same value in duplicate sets (
B033,PLC0208) (#14064) -
`eradicate` -
`flake8-pyi` -
`flake8-pyi` -
`pyflakes` -
`ruff`
Bug fixes
- Avoid parsing joint rule codes as distinct codes in
# noqa(#12809) -
`eradicate` -
`flake8-bugbear` -
`flake8-builtins` -
`flake8-comprehension` -
`flake8-simplify` -
`pylint` -
`pylint` -
`pyupgrade` -
`refurb`
Documentation
- Add links to missing related options within rule documentations (#13971)
- Add rule short code to mkdocs tags to allow searching via rule codes (#14040)
0.7.4
Preview features
-
`flake8-datetimez` -
`flake8-logging` -
`flake8-no-pep420` -
`flake8-pyi` -
`perflint` -
`pylint` -
`ruff` -
`ruff` -
`ruff`
Rule changes
-
`flake8-boolean-trap` -
`flake8-pyi` -
`flake8-pyi` -
`flake8-pyi` -
`flake8-pyi`
Server
- Use the current working directory to resolve settings from
ruff.configuration(#14352)
Bug fixes
- Avoid conflicts between
PLC014(useless-import-alias) andI002(missing-required-import) by consideringlint.isort.required-importsforPLC014(#14287) -
`flake8-type-checking` -
`flake8-pyi` -
`flake8-pytest-style` -
`flake8-simplify` -
`flake8-type-checking` -
`pylint` -
`pylint` -
`pyupgrade` -
`pyupgrade` -
`refurb` -
`refurb` -
`refurb` -
`ruff` -
`ruff`