github astral-sh/ruff v0.0.238

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

What's Changed

⚠️ Breaking Changes ⚠️

select, extend-select, ignore, and extend-ignore have new semantics (#2312)

Previously, the interplay between select and its related options could lead to unexpected behavior. For example, ruff --select E501 --ignore ALL and ruff --select E501 --extend-ignore ALL behaved differently. (See #2312 for more examples.)

The new semantics are such that Ruff uses the "highest-priority" select as the basis for the rule set, and then applies any extend-select, ignore, and extend-ignore adjustments. CLI options are given higher priority than pyproject.toml options, and the current pyproject.toml file is given higher priority than any inherited pyproject.toml files.

As an example: ruff --select F401 will select rule F401, and ignore any of the modifiers from the pyproject.toml, as the "highest-priorty" select kicks off the resolution chain.

This change is largely backwards compatible -- most users should experience no change in behavior. For more, see BREAKING_CHANGES.md.

remove-six-compat (UP016) has been removed (#2332)

The remove-six-compat rule has been removed. This rule was only useful for one-time Python 2-to-3 upgrades.

Rules

  • Implement Pylint's too-many-arguments rule (PLR0913) by @akhildevelops in #2308
  • Extend conventional imports defaults to include TensorFlow et al by @sbrugman in #2353

Settings

Bug Fixes

New Contributors

Full Changelog: v0.0.237...v0.0.238

Don't miss a new ruff release

NewReleases is sending notifications on new releases.