ruff/changelogs/0.7.x.md

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 PT001 and PT023 now 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-except rule (in our tryceratops category) has been recoded from TRY302 to TRY203 (#13502). This ensures Ruff's code is consistent with the same rule in the tryceratops linter.
  • The lint.allow-unused-imports setting has been removed (#13677). Use lint.pyflakes.allow-unused-imports instead.

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`
  • `flake8-simplify`
    being opened from a wider range of standard-library functions (#12959).

CLI

  • Add explanation of fixable in --statistics command (#13774)

Bug fixes

  • `pyflakes`
  • `flake8-use-pathlib`
  • `flake8-bandit`
  • `flake8-pyi`

0.7.1

Preview features

  • Fix E221 and E222 to 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 ARG002 compatible with EM101 when raising NotImplementedError (#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.rs with 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) and I002 (missing-required-import) by considering lint.isort.required-imports for PLC014 (#14287)
  • `flake8-type-checking`
  • `flake8-pyi`
  • `flake8-pytest-style`
  • `flake8-simplify`
  • `flake8-type-checking`
  • `pylint`
  • `pylint`
  • `pyupgrade`
  • `pyupgrade`
  • `refurb`
  • `refurb`
  • `refurb`
  • `ruff`
  • `ruff`

Documentation

  • Add "Notebook behavior" section for F704, PLE1142 (#14266)
  • Document comment policy around fix safety (#14300)