What's Changed
Breaking Changes
--explain
, --clean
, and --generate-shell-completion
are now implemented as subcommands (#2190):
ruff . # Still works! And will always work.
ruff check . # New! Also works.
ruff --explain E402 # Still works.
ruff rule E402 # New! Also works. (And preferred.)
# Oops! The command has to come first.
ruff --format json --explain E402 # No longer works.
ruff --explain E402 --format json # Still works!
ruff rule E402 --format json # Works! (And preferred.)
This change is largely backwards compatible -- most users should experience no change in behavior. For exceptions, see BREAKING_CHANGES.md
.
Rules
- feat: pylint
PLE0604
andPLE0605
by @sbrugman in #2241 - feat: include os.getcwdb (bytes) into flake8-use-pathlib by @sbrugman in #2276
- [
flake8-bandit
] Add Rule S110 (try/except/pass) by @sciyoshi in #2197
Settings
- Omit typing module from flake8-type-checking by default by @charliermarsh in #2277
Bug Fixes
- Fix SIM300 to take Python constants into account by @frenck in #2255
- Treat constant tuples as constants for yoda-conditions by @charliermarsh in #2265
- Treat attribute constants as constant for yoda-conditions by @frenck in #2266
- flake8-annotations: Move has_any_typed_arg into correct nested
if
by @akx in #2269 - Expand heuristic for detecting logging calls by @charliermarsh in #2279
- Preserve global binding kind during reassignments by @charliermarsh in #2297
- Fix typo in typing_extensions by @Jonxslays in #2298
New Contributors
- @frenck made their first contribution in #2255
- @sladyn98 made their first contribution in #2141
- @the-matt-morris made their first contribution in #2291
- @Jonxslays made their first contribution in #2298
Full Changelog: v0.0.236...v0.0.237