github astral-sh/ruff v0.2.0

latest releases: 0.7.3, 0.7.2, 0.7.1...
9 months ago

Check out the blog post for a migration guide and overview of the changes!

Changes

Breaking changes

  • The NURSERY selector cannot be used anymore
  • Legacy selection of nursery rules by exact codes is no longer allowed without preview enabled

See also, the "Remapped rules" section which may result in disabled rules.

Deprecations

The following rules are now deprecated:

The following command line options are now deprecated:

  • --show-source; use --output-format full instead
  • --no-show-source; use --output-format concise instead
  • --output-format text; use full or concise instead

The following settings have moved and the previous name is deprecated:

Remapped rules

The following rules have been remapped to new codes:

Stabilizations

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

Fixes for the following rules have been stabilized and are now available without preview:

Fixes for the following rules have been promoted from unsafe to safe:

The following behaviors have been stabilized:

Preview features

  • [refurb] Implement metaclass_abcmeta (FURB180) (#9658)
  • Implement blank_line_after_nested_stub_class preview style (#9155)
  • The preview rule and-or-ternary (PLR1706) was removed

Bug fixes

  • [flake8-async] Take pathlib.Path into account when analyzing async functions (#9703)
  • [flake8-return] - fix indentation syntax error (RET505) (#9705)
  • Detect multi-statement lines in else removal (#9748)
  • RUF022, RUF023: never add two trailing commas to the end of a sequence (#9698)
  • RUF023: Don't sort __match_args__, only __slots__ (#9724)
  • [flake8-simplify] - Fix syntax error in autofix (SIM114) (#9704)
  • [pylint] Show verbatim constant in magic-value-comparison (PLR2004) (#9694)
  • Removing trailing whitespace inside multiline strings is unsafe (#9744)
  • Support IfExp with dual string arms in invalid-envvar-default (#9734)
  • [pylint] Add __mro_entries__ to known dunder methods (PLW3201) (#9706)

Documentation

  • Removed rules are now retained in the documentation (#9691)
  • Deprecated rules are now indicated in the documentation (#9689)

Contributors

Don't miss a new ruff release

NewReleases is sending notifications on new releases.