mirror of https://github.com/astral-sh/ruff
20 KiB
20 KiB
Changelog 0.6.x
0.6.0
Check out the blog post for a migration guide and overview of the changes!
Breaking changes
See also, the "Remapped rules" section which may result in disabled rules.
- Lint and format Jupyter Notebook by default (#12878).
- Detect imports in
srclayouts by default forisortrules (#12848) - The pytest rules
PT001andPT023now default to omitting the decorator parentheses when there are no arguments (#12838).
Deprecations
The following rules are now deprecated:
pytest-missing-fixture-name-underscore(PT004)pytest-incorrect-fixture-name-underscore(PT005)unpacked-list-comprehension(UP027)
Remapped rules
The following rules have been remapped to new rule codes:
unnecessary-dict-comprehension-for-iterable:RUF025toC420
Stabilization
The following rules have been stabilized and are no longer in preview:
singledispatch-method(PLE1519)singledispatchmethod-function(PLE1520)bad-staticmethod-argument(PLW0211)if-stmt-min-max(PLR1730)invalid-bytes-return-type(PLE0308)invalid-hash-return-type(PLE0309)invalid-index-return-type(PLE0305)invalid-length-return-type(PLEE303)self-or-cls-assignment(PLW0642)byte-string-usage(PYI057)duplicate-literal-member(PYI062)redirected-noqa(RUF101)
The following behaviors have been stabilized:
cancel-scope-no-checkpoint(ASYNC100): Supportasyncioandanyiocontext managers.async-function-with-timeout(ASYNC109): Supportasyncioandanyiocontext managers.async-busy-wait(ASYNC110): Supportasyncioandanyiocontext managers.async-zero-sleep(ASYNC115): Supportanyiocontext managers.long-sleep-not-forever(ASYNC116): Supportanyiocontext managers.
The following fixes have been stabilized:
superfluous-else-return(RET505)superfluous-else-raise(RET506)superfluous-else-continue(RET507)superfluous-else-break(RET508)
Preview features
-
`flake8-simplify` -
`pyupgrade`
Rule changes
-
`flake8-import-conventions` -
`flake8-pytest-style`
Server
- Show a message for incorrect settings (#12781)
Bug fixes
-
`flake8-async` -
`flake8-comprehensions` -
`flake8-return` -
`flake8-type-checking` -
`pep8-naming` -
`pydoclint` -
`ruff` -
`ruff` -
`ruff` -
`ruff` - Evaluate default parameter values for a function in that function's enclosing scope (#12852)
Other changes
- Respect VS Code cell metadata when detecting the language of Jupyter Notebook cells (#12864)
- Respect
kernelspecnotebook metadata when detecting the preferred language for a Jupyter Notebook (#12875)
0.6.1
This is a hotfix release to address an issue with ruff-pre-commit. In v0.6,
Ruff changed its behavior to lint and format Jupyter notebooks by default;
however, due to an oversight, these files were still excluded by default if
Ruff was run via pre-commit, leading to inconsistent behavior.
This has now been fixed.
Preview features
-
`fastapi`
Rule changes
-
`pylint`
Server
- Fix crash when applying "fix-all" code-action to notebook cells (#12929)
Other changes
-
`flake8-naming`
0.6.2
Preview features
-
`flake8-simplify` -
`ruff` -
`ruff` -
`ruff`
Rule changes
-
`flake8-bugbear` -
`flake8-pyi` -
`flake8-type-checking` -
`flake8-unused-arguments` -
`pylint`
Server
- Show full context in error log messages (#13029)
Bug fixes
-
`pep8-naming` -
`pylint`
Documentation
- Add
hyperfineinstallation instructions; updatehyperfinecode samples (#13034) - Expand note to use Ruff with other language server in Kate (#12806)
- Update example for
PT001as per the new default behavior (#13019) -
`perflint` -
`pydocstyle`
0.6.3
Preview features
-
`flake8-simplify` -
`pycodestyle` -
`pydoclint`
Rule changes
-
`flake8-async`
Bug fixes
-
`FastAPI` -
`flake8-implicit-str-concat` -
`flake8-pytest-style` -
`pylint` -
`ruff` -
`ruff` - Fix dark theme on initial page load for the Ruff playground (#13077)
0.6.4
Preview features
-
`flake8-builtins` -
`pydoclint` -
`pylint` -
`ruff` -
`ruff`
Rule changes
-
`flake8-pyi` -
`flake8-pyi` -
`pylint` -
`pylint` -
`pyupgrade` -
`pyupgrade`
CLI
- Enrich messages of SARIF results (#13180)
- Handle singular case for incompatible rules warning in
ruff formatoutput (#13212)
Bug fixes
-
`pydocstyle` -
`refurb`
0.6.5
Preview features
-
`pydoclint` -
`refurb`
Rule changes
-
`eradicate` -
`pyflakes`
Server
- Add support for extensionless Python files for server (#13326)
- Fix configuration inheritance for configurations specified in the LSP settings (#13285)
Bug fixes
-
`ruff`
CLI
- Only include rules with diagnostics in SARIF metadata (#13268)
Playground
- Add "Copy as pyproject.toml/ruff.toml" and "Paste from TOML" (#13328)
- Fix errors not shown for restored snippet on page load (#13262)
0.6.6
Preview features
-
`refurb` - Add a subcommand to generate dependency graphs (#13402)
Formatter
- Fix placement of inline parameter comments (#13379)
Server
- Fix off-by one error in the
LineIndex::offsetcalculation (#13407)
Bug fixes
-
`fastapi` -
`pydocstyle`
Documentation
- Add backlinks to rule overview linter (#13368)
- Fix documentation for editor vim plugin ALE (#13348)
- Fix rendering of
FURB188docs (#13406)
0.6.7
Preview features
- Add Python version support to ruff analyze CLI (#13426)
- Add
excludesupport toruff analyze(#13425) - Fix parentheses around return type annotations (#13381)
Rule changes
-
`pycodestyle`
Bug fixes
- Respect
lint.excludein ruff check--add-noqa(#13427)
Performance
- Avoid tracking module resolver files in Salsa (#13437)
- Use
forgetfor module resolver database (#13438)
0.6.8
Preview features
- Remove unnecessary parentheses around
match caseclauses (#13510) - Parenthesize overlong
ifguards inmatch..caseclauses (#13513) - Detect basic wildcard imports in
ruff analyze graph(#13486) -
`pylint`
Rule changes
-
`lake8-simplify` -
`pyupgrade`
Bug fixes
- Detect tuples bound to variadic positional arguments i.e.
*args(#13512) - Exit gracefully on broken pipe errors (#13485)
- Avoid panic when analyze graph hits broken pipe (#13484)
Performance
0.6.9
Preview features
- Fix codeblock dynamic line length calculation for indented docstring examples (#13523)
-
`refurb`
Rule changes
-
`pydocstyle` -
`pylint`
Configuration
-
`pyflakes`
Bug fixes
- Support ruff discovery in pip build environments (#13591)
-
`flake8-bugbear` -
`pylint` -
`pyupgrade` -
`refurb`
Documentation
- Update GitHub Action link to
astral-sh/ruff-action(#13551)