|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 0.15.2 |
| 4 | + |
| 5 | +Released on 2026-02-19. |
| 6 | + |
| 7 | +### Preview features |
| 8 | + |
| 9 | +- Expand the default rule set ([#23385](https://github.com/astral-sh/ruff/pull/23385)) |
| 10 | + |
| 11 | + In preview, Ruff now enables a significantly expanded default rule set of 412 |
| 12 | + rules, up from the stable default set of 59 rules. The new rules are mostly a |
| 13 | + superset of the stable defaults, with the exception of these rules, which are |
| 14 | + removed from the preview defaults: |
| 15 | + |
| 16 | + - [`multiple-imports-on-one-line`](https://docs.astral.sh/ruff/rules/multiple-imports-on-one-line) (`E401`) |
| 17 | + - [`module-import-not-at-top-of-file`](https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file) (`E402`) |
| 18 | + - [`module-import-not-at-top-of-file`](https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file) (`E701`) |
| 19 | + - [`multiple-statements-on-one-line-semicolon`](https://docs.astral.sh/ruff/rules/multiple-statements-on-one-line-semicolon) (`E702`) |
| 20 | + - [`useless-semicolon`](https://docs.astral.sh/ruff/rules/useless-semicolon) (`E703`) |
| 21 | + - [`none-comparison`](https://docs.astral.sh/ruff/rules/none-comparison) (`E711`) |
| 22 | + - [`true-false-comparison`](https://docs.astral.sh/ruff/rules/true-false-comparison) (`E712`) |
| 23 | + - [`not-in-test`](https://docs.astral.sh/ruff/rules/not-in-test) (`E713`) |
| 24 | + - [`not-is-test`](https://docs.astral.sh/ruff/rules/not-is-test) (`E714`) |
| 25 | + - [`type-comparison`](https://docs.astral.sh/ruff/rules/type-comparison) (`E721`) |
| 26 | + - [`lambda-assignment`](https://docs.astral.sh/ruff/rules/lambda-assignment) (`E731`) |
| 27 | + - [`ambiguous-variable-name`](https://docs.astral.sh/ruff/rules/ambiguous-variable-name) (`E741`) |
| 28 | + - [`ambiguous-class-name`](https://docs.astral.sh/ruff/rules/ambiguous-class-name) (`E742`) |
| 29 | + - [`ambiguous-function-name`](https://docs.astral.sh/ruff/rules/ambiguous-function-name) (`E743`) |
| 30 | + - [`undefined-local-with-import-star`](https://docs.astral.sh/ruff/rules/undefined-local-with-import-star) (`F403`) |
| 31 | + - [`undefined-local-with-import-star-usage`](https://docs.astral.sh/ruff/rules/undefined-local-with-import-star-usage) (`F405`) |
| 32 | + - [`undefined-local-with-nested-import-star-usage`](https://docs.astral.sh/ruff/rules/undefined-local-with-nested-import-star-usage) (`F406`) |
| 33 | + - [`forward-annotation-syntax-error`](https://docs.astral.sh/ruff/rules/forward-annotation-syntax-error) (`F722`) |
| 34 | + |
| 35 | + If you use preview and prefer the old defaults, you can restore them with |
| 36 | + configuration like: |
| 37 | + |
| 38 | + ```toml |
| 39 | + |
| 40 | + # ruff.toml |
| 41 | + |
| 42 | + [lint] |
| 43 | + select = ["E4", "E7", "E9", "F"] |
| 44 | + |
| 45 | + # pyproject.toml |
| 46 | + |
| 47 | + [tool.ruff.lint] |
| 48 | + select = ["E4", "E7", "E9", "F"] |
| 49 | + ``` |
| 50 | + |
| 51 | + If you do give them a try, feel free to share your feedback in the [GitHub |
| 52 | + discussion](https://github.com/astral-sh/ruff/discussions/23203)! |
| 53 | + |
| 54 | +- \[`flake8-pyi`\] Also check string annotations (`PYI041`) ([#19023](https://github.com/astral-sh/ruff/pull/19023)) |
| 55 | + |
| 56 | +### Bug fixes |
| 57 | + |
| 58 | +- \[`flake8-async`\] Fix `in_async_context` logic ([#23426](https://github.com/astral-sh/ruff/pull/23426)) |
| 59 | +- \[`ruff`\] Fix for `RUF102` should delete entire comment ([#23380](https://github.com/astral-sh/ruff/pull/23380)) |
| 60 | +- \[`ruff`\] Suppress diagnostic for strings with backslashes in interpolations before Python 3.12 (`RUF027`) ([#21069](https://github.com/astral-sh/ruff/pull/21069)) |
| 61 | +- \[`flake8-bugbear`\] Fix `B023` false positive for immediately-invoked lambdas ([#23294](https://github.com/astral-sh/ruff/pull/23294)) |
| 62 | +- [parser] Fix false syntax error for match-like annotated assignments ([#23297](https://github.com/astral-sh/ruff/pull/23297)) |
| 63 | +- [parser] Fix indentation tracking after line continuations ([#23417](https://github.com/astral-sh/ruff/pull/23417)) |
| 64 | + |
| 65 | +### Rule changes |
| 66 | + |
| 67 | +- \[`flake8-executable`\] Allow global flags in uv shebangs (`EXE003`) ([#22582](https://github.com/astral-sh/ruff/pull/22582)) |
| 68 | +- \[`pyupgrade`\] Fix handling of `typing.{io,re}` (`UP035`) ([#23131](https://github.com/astral-sh/ruff/pull/23131)) |
| 69 | +- \[`ruff`\] Detect `PLC0207` on chained `str.split()` calls ([#23275](https://github.com/astral-sh/ruff/pull/23275)) |
| 70 | + |
| 71 | +### CLI |
| 72 | + |
| 73 | +- Remove invalid inline `noqa` warning ([#23270](https://github.com/astral-sh/ruff/pull/23270)) |
| 74 | + |
| 75 | +### Configuration |
| 76 | + |
| 77 | +- Add extension mapping to configuration file options ([#23384](https://github.com/astral-sh/ruff/pull/23384)) |
| 78 | + |
| 79 | +### Documentation |
| 80 | + |
| 81 | +- Add `Q004` to the list of conflicting rules ([#23340](https://github.com/astral-sh/ruff/pull/23340)) |
| 82 | +- \[`ruff`\] Expand `lint.external` docs and add sub-diagnostic (`RUF100`, `RUF102`) ([#23268](https://github.com/astral-sh/ruff/pull/23268)) |
| 83 | + |
| 84 | +### Contributors |
| 85 | + |
| 86 | +- [@dylwil3](https://github.com/dylwil3) |
| 87 | +- [@Jkhall81](https://github.com/Jkhall81) |
| 88 | +- [@danparizher](https://github.com/danparizher) |
| 89 | +- [@dhruvmanila](https://github.com/dhruvmanila) |
| 90 | +- [@harupy](https://github.com/harupy) |
| 91 | +- [@ngnpope](https://github.com/ngnpope) |
| 92 | +- [@amyreese](https://github.com/amyreese) |
| 93 | +- [@kar-ganap](https://github.com/kar-ganap) |
| 94 | +- [@robsdedude](https://github.com/robsdedude) |
| 95 | +- [@shaanmajid](https://github.com/shaanmajid) |
| 96 | +- [@ntBre](https://github.com/ntBre) |
| 97 | +- [@toslunar](https://github.com/toslunar) |
| 98 | + |
3 | 99 | ## 0.15.1 |
4 | 100 |
|
5 | 101 | Released on 2026-02-12. |
|
0 commit comments