Skip to content

Releases: astral-sh/ruff

v0.0.287

01 Sep 17:09
2f3a950
Compare
Choose a tag to compare

What's Changed

Rules

Bug Fixes

New Contributors

Full Changelog: v0.0.286...v0.0.287

v0.0.286

25 Aug 19:46
91880b8
Compare
Choose a tag to compare

What's Changed

New Rules

  • [flake8-bugbear] Update function-call-in-argument-default (B008) to ignore arguments with immutable annotations by @zanieb in #6784
  • [flake8-bugbear] Update mutable-argument-default (B006) to use extend-immutable-calls when determining if annotations are immutable by @zanieb in #6781
  • [flake8-pie] Implement unnecessary-range-start (PIE808) by @harupy in #6690
  • [flake8-pytest-style] Add autofix for PT014 by @harupy in #6698
  • [pylint] Implement no-self-use (R6301) by @LaBatata101 in #6574
  • [pylint] Extend repeated-equality-comparison-target to check for mixed orderings and Yoda conditions. by @tjkuson in #6691

Settings

Bug Fixes

Full Changelog: v0.0.285...v0.0.286

v0.0.285

17 Aug 21:24
5892c69
Compare
Choose a tag to compare

What's Changed

New rules

  • [flake8-pytest-style] Implement pytest-unittest-raises-assertion (PT027) by @harupy in #6554
  • [flake8-pytest-style] Implement pytest-duplicate-parametrize-test-cases (PT014) by @harupy in #6598
  • [flake8-tidy-imports] Implement banned-module-level-imports (TID253) by @durumu in #6378
  • [pylint] Implement bad-dunder-name (W3201) (in the Ruff nursery) by @LaBatata101 in #6486
  • [pylint] Implement subprocess-run-check (W1510) by @tjkuson in #6487
  • [ruff] Implement quadratic-list-summation (RUF017) by @evanrittenhouse in #6489

Rule changes

Settings

  • Respect .ipynb and .pyi sources when linting from stdin by @charliermarsh in #6628
  • Support glob patterns for raises_require_match_for and raises_require_match_for by @harupy in #6635

Bug Fixes

Playground

Performance

New Contributors

Full Changelog: v0.0.284...v0.0.285

v0.0.284

09 Aug 19:12
3ecd263
Compare
Choose a tag to compare

What's Changed

This release fixes a few bugs. Notably, the previous release announced a breaking change where the default target
Python version changed from 3.10 to 3.8 but the change was not applied. Thanks to @rco-ableton for fixing this in
#6444

Bug Fixes

New Contributors

Full Changelog: v0.0.283...v0.0.284

v0.0.283

08 Aug 19:13
fe9590f
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • Assume Python 3.8 instead of 3.10 for target version by @zanieb in #6397

Rules

  • [flake8-pyi] PYI019: Detects if a type variable is used instead of Self in return annotations by @qdegraaf in #6204
  • [flake8-pyi] PYI051: Detects unions of Literal types by @LaBatata101 in #6215
  • [flake8-pyi] PYI055: Detects unions of types by @LaBatata101 in #6316
  • [pylint] E1300: Detects invalid string format characters by @silvanocerza in #6171
  • [pyupgrade] UP040: Upgrades type alias annotations to use PEP-695 syntax by @zanieb in #6289

Rule Changes

Bug Fixes

  • [flake8-bugbear] B006: Respect typing_extensions imports of Annotated by @PIG208 in #6361
  • [flake8-pyi] PYI019: Fix panic with positional-only arguments by @charliermarsh in #6350
  • [flake8-use-pathlib] Avoid raising PTH206 with maxsplit by @charliermarsh in #6283
  • [flake8] F841: Update autofix to not remove Jupyer magic expressions by @dhruvmanila in #6141
  • [pycodestyle] E721: Include comparisons to builtin types by @charliermarsh in #6325
  • [pycodestyle] E721: Match left-hand side types() call in types-comparison by @charliermarsh in #6326
  • [pyupgrade] UP031: Avoid auto-fixing if there are comments within the right-hand side by @harupy in #6364
  • [pyupgrade] UP032: Avoid auto-fixing if comments are present around format call arguments by @harupy in #6342
  • [pyupgrade] UP032: Improve invalid expression check by @harupy in #6308
  • Avoid attempting to fix .format(...) calls with too-few-arguments by @charliermarsh in #6401
  • Fix bug where .gitignore files in parent directories were incorrectly used by @charliermarsh in #6368
  • Fix duplicate violations raised on nested bitwise or Union expressions by @charliermarsh in #6399

Playground

Other Changes

  • Improve handling of violations around Jupyter magic expressions by @dhruvmanila in #5552
  • Reduce memory usage by boxing type params and arguments fields on the class definition node by @charliermarsh in #6275
  • Upgrade Rust to 1.71 by @zanieb in #6323

New Contributors

Full Changelog: v0.0.282...v0.0.283

v0.0.282

01 Aug 14:57
743118a
Compare
Choose a tag to compare

What's Changed

Bug Fixes

New Contributors

Full Changelog: v0.0.281...v0.0.282

v0.0.281

31 Jul 18:28
dbd60b2
Compare
Choose a tag to compare

What's Changed

See the release blog post for more, including detailed descriptions of any newly added rules.

New rules

Rule changes

  • [flake8-bugbear] Extends B002 to detect unary prefix decrement operators by @tjkuson in #5998
  • [flake8-pytest-style] Avoid raising PT012 for simple with statements by @harupy in #6081
  • [flake8-pytest-style] Allow pytest.raises body to contain a single func or class definition by @harupy in #6083
  • [flake8-simplify] Extend SIM118 with not in by @sbrugman in #5995
  • [perflint] Skip PERF203 violations for multi-statement loops by @charliermarsh in #6145
  • [pyupgrade] Add support for int, float, bool in UP018 by @dhruvmanila in #6013
  • [tryceratops] Add suggested fix for TRY201 by @dhruvmanila in #6008

Settings

Bug Fixes

New Contributors

Full Changelog: v0.0.280...v0.0.281

v0.0.280

23 Jul 14:10
86b6a3e
Compare
Choose a tag to compare

What's Changed

Bug Fixes

Full Changelog: v0.0.279...v0.0.280

v0.0.279

21 Jul 21:56
f1f89f2
Compare
Choose a tag to compare

What's Changed

Rules

  • [flake8-pyi] Implement flake8-pyi's PYI026 by @LaBatata101 in #5844
  • [flake8-pyi] Implement flake8-pyi's PYI017 by @qdegraaf in #5895
  • [flake8-pyi] Implement flake8-pyi's PYI036 by @density in #5668
  • [flake8-pyi] Implement flake8-pyi's PYI041 by @density in #5722
  • [flake8-use-pathlib] Implement os-path-getsize and os-path-get(a|m|c)-time (PTH202-205) by @sbrugman in #5835
  • [flake8-use-pathlib] Implement path-constructor-default-argument (PTH201) by @sbrugman in #5833
  • [pandas-vet] Implement constant series rule (PD101) by @sbrugman in #5802
  • [pylint] Implement Pylint's consider-using-in (PLR1714) by @tjkuson in #5193

Rule changes

Bug Fixes

New Contributors

Full Changelog: v0.0.278...v0.0.279

v0.0.278

12 Jul 17:06
0ead9a1
Compare
Choose a tag to compare

See the release blog post for more, including detailed descriptions of any newly added rules.

What's Changed

Rules

  • [pylint] Implement typevar-bivariance (PLC0131) by @tjkuson in #5517
  • [flake8-pyi] Implement unnecessary-literal-union (PYI030) by @zanieb in #5570
  • [pylint] Implement type-name-incorrect-variance (PLC0105) by @tjkuson in #5651
  • [ruff] Implement unnecessary-list-allocation-for-first-element (RUF015) by @evanrittenhouse in #5549
  • [flake8-bugbear] Implement re-sub-positional-args (B034) by @charliermarsh in #5669
  • [ruff] Implement invalid-index-type (RUF016) by @zanieb in #5602

Settings

Bug Fixes

New Contributors

Full Changelog: v0.0.277...v0.0.278