Skip to content

Commit 7cc15f0

Browse files
authored
Bump 0.15.2 (#23430)
1 parent d1b5443 commit 7cc15f0

File tree

11 files changed

+113
-17
lines changed

11 files changed

+113
-17
lines changed

CHANGELOG.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,101 @@
11
# Changelog
22

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+
399
## 0.15.1
4100

5101
Released on 2026-02-12.

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ curl -LsSf https://astral.sh/ruff/install.sh | sh
152152
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
153153

154154
# For a specific version.
155-
curl -LsSf https://astral.sh/ruff/0.15.1/install.sh | sh
156-
powershell -c "irm https://astral.sh/ruff/0.15.1/install.ps1 | iex"
155+
curl -LsSf https://astral.sh/ruff/0.15.2/install.sh | sh
156+
powershell -c "irm https://astral.sh/ruff/0.15.2/install.ps1 | iex"
157157
```
158158

159159
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
@@ -186,7 +186,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff
186186
```yaml
187187
- repo: https://github.com/astral-sh/ruff-pre-commit
188188
# Ruff version.
189-
rev: v0.15.1
189+
rev: v0.15.2
190190
hooks:
191191
# Run the linter.
192192
- id: ruff-check

crates/ruff/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruff"
3-
version = "0.15.1"
3+
version = "0.15.2"
44
publish = true
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruff_linter"
3-
version = "0.15.1"
3+
version = "0.15.2"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruff_wasm"
3-
version = "0.15.1"
3+
version = "0.15.2"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

docs/formatter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ support needs to be explicitly included by adding it to `types_or`:
328328
```yaml title=".pre-commit-config.yaml"
329329
repos:
330330
- repo: https://github.com/astral-sh/ruff-pre-commit
331-
rev: v0.15.1
331+
rev: v0.15.2
332332
hooks:
333333
- id: ruff-format
334334
types_or: [python, pyi, jupyter, markdown]

docs/integrations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ You can add the following configuration to `.gitlab-ci.yml` to run a `ruff forma
8080
stage: build
8181
interruptible: true
8282
image:
83-
name: ghcr.io/astral-sh/ruff:0.15.1-alpine
83+
name: ghcr.io/astral-sh/ruff:0.15.2-alpine
8484
before_script:
8585
- cd $CI_PROJECT_DIR
8686
- ruff --version
@@ -106,7 +106,7 @@ Ruff can be used as a [pre-commit](https://pre-commit.com) hook via [`ruff-pre-c
106106
```yaml
107107
- repo: https://github.com/astral-sh/ruff-pre-commit
108108
# Ruff version.
109-
rev: v0.15.1
109+
rev: v0.15.2
110110
hooks:
111111
# Run the linter.
112112
- id: ruff-check
@@ -119,7 +119,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
119119
```yaml
120120
- repo: https://github.com/astral-sh/ruff-pre-commit
121121
# Ruff version.
122-
rev: v0.15.1
122+
rev: v0.15.2
123123
hooks:
124124
# Run the linter.
125125
- id: ruff-check
@@ -133,7 +133,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed
133133
```yaml
134134
- repo: https://github.com/astral-sh/ruff-pre-commit
135135
# Ruff version.
136-
rev: v0.15.1
136+
rev: v0.15.2
137137
hooks:
138138
# Run the linter.
139139
- id: ruff-check

docs/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ This tutorial has focused on Ruff's command-line interface, but Ruff can also be
369369
```yaml
370370
- repo: https://github.com/astral-sh/ruff-pre-commit
371371
# Ruff version.
372-
rev: v0.15.1
372+
rev: v0.15.2
373373
hooks:
374374
# Run the linter.
375375
- id: ruff-check

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "ruff"
7-
version = "0.15.1"
7+
version = "0.15.2"
88
description = "An extremely fast Python linter and code formatter, written in Rust."
99
authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }]
1010
readme = "README.md"

0 commit comments

Comments
 (0)