ruff/changelogs/0.6.x.md

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 src layouts by default for isort rules (#12848)
  • The pytest rules PT001 and PT023 now default to omitting the decorator parentheses when there are no arguments (#12838).

Deprecations

The following rules are now deprecated:

Remapped rules

The following rules have been remapped to new rule codes:

Stabilization

The following rules have been stabilized and are no longer in preview:

The following behaviors have been stabilized:

The following fixes have been stabilized:

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 kernelspec notebook 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 hyperfine installation instructions; update hyperfine code samples (#13034)
  • Expand note to use Ruff with other language server in Kate (#12806)
  • Update example for PT001 as 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 format output (#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::offset calculation (#13407)

Bug fixes

  • `fastapi`
  • `pydocstyle`

Documentation

  • Add backlinks to rule overview linter (#13368)
  • Fix documentation for editor vim plugin ALE (#13348)
  • Fix rendering of FURB188 docs (#13406)

0.6.7

Preview features

  • Add Python version support to ruff analyze CLI (#13426)
  • Add exclude support to ruff analyze (#13425)
  • Fix parentheses around return type annotations (#13381)

Rule changes

  • `pycodestyle`

Bug fixes

  • Respect lint.exclude in ruff check --add-noqa (#13427)

Performance

  • Avoid tracking module resolver files in Salsa (#13437)
  • Use forget for module resolver database (#13438)

0.6.8

Preview features

  • Remove unnecessary parentheses around match case clauses (#13510)
  • Parenthesize overlong if guards in match..case clauses (#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

  • Reuse BTreeSets in module resolver (#13440)
  • Skip traversal for non-compound statements (#13441)

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)