Skip to content

Commit e4c7f35

Browse files
authored
Bump 0.15.6 (#23919)
1 parent edfe6c1 commit e4c7f35

16 files changed

Lines changed: 87 additions & 22 deletions

File tree

CHANGELOG.md

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

3+
## 0.15.6
4+
5+
Released on 2026-03-12.
6+
7+
### Preview features
8+
9+
- Add support for `lazy` import parsing ([#23755](https://github.com/astral-sh/ruff/pull/23755))
10+
- Add support for star-unpacking of comprehensions (PEP 798) ([#23788](https://github.com/astral-sh/ruff/pull/23788))
11+
- Reject semantic syntax errors for lazy imports ([#23757](https://github.com/astral-sh/ruff/pull/23757))
12+
- Drop a few rules from the preview default set ([#23879](https://github.com/astral-sh/ruff/pull/23879))
13+
- \[`airflow`\] Flag `Variable.get()` calls outside of task execution context (`AIR003`) ([#23584](https://github.com/astral-sh/ruff/pull/23584))
14+
- \[`airflow`\] Flag runtime-varying values in DAG/task constructor arguments (`AIR304`) ([#23631](https://github.com/astral-sh/ruff/pull/23631))
15+
- \[`flake8-bugbear`\] Implement `delattr-with-constant` (`B043`) ([#23737](https://github.com/astral-sh/ruff/pull/23737))
16+
- \[`flake8-tidy-imports`\] Add `TID254` to enforce lazy imports ([#23777](https://github.com/astral-sh/ruff/pull/23777))
17+
- \[`flake8-tidy-imports`\] Allow users to ban lazy imports with `TID254` ([#23847](https://github.com/astral-sh/ruff/pull/23847))
18+
- \[`isort`\] Retain `lazy` keyword when sorting imports ([#23762](https://github.com/astral-sh/ruff/pull/23762))
19+
- \[`pyupgrade`\] Add `from __future__ import annotations` automatically (`UP006`) ([#23260](https://github.com/astral-sh/ruff/pull/23260))
20+
- \[`refurb`\] Support `newline` parameter in `FURB101` for Python 3.13+ ([#23754](https://github.com/astral-sh/ruff/pull/23754))
21+
- \[`ruff`\] Add `os-path-commonprefix` (`RUF071`) ([#23814](https://github.com/astral-sh/ruff/pull/23814))
22+
- \[`ruff`\] Add unsafe fix for os-path-commonprefix (`RUF071`) ([#23852](https://github.com/astral-sh/ruff/pull/23852))
23+
- \[`ruff`\] Limit `RUF036` to typing contexts; make it unsafe for non-typing-only ([#23765](https://github.com/astral-sh/ruff/pull/23765))
24+
- \[`ruff`\] Use starred unpacking for `RUF017` in Python 3.15+ ([#23789](https://github.com/astral-sh/ruff/pull/23789))
25+
26+
### Bug fixes
27+
28+
- Fix `--add-noqa` creating unwanted leading whitespace ([#23773](https://github.com/astral-sh/ruff/pull/23773))
29+
- Fix `--add-noqa` breaking shebangs ([#23577](https://github.com/astral-sh/ruff/pull/23577))
30+
- [formatter] Fix lambda body formatting for multiline calls and subscripts ([#23866](https://github.com/astral-sh/ruff/pull/23866))
31+
- [formatter] Preserve required annotation parentheses in annotated assignments ([#23865](https://github.com/astral-sh/ruff/pull/23865))
32+
- [formatter] Preserve type-expression parentheses in the formatter ([#23867](https://github.com/astral-sh/ruff/pull/23867))
33+
- \[`flake8-annotations`\] Fix stack overflow in `ANN401` on quoted annotations with escape sequences ([#23912](https://github.com/astral-sh/ruff/pull/23912))
34+
- \[`pep8-naming`\] Check naming conventions in `match` pattern bindings (`N806`, `N815`, `N816`) ([#23899](https://github.com/astral-sh/ruff/pull/23899))
35+
- \[`perflint`\] Fix comment duplication in fixes (`PERF401`, `PERF403`) ([#23729](https://github.com/astral-sh/ruff/pull/23729))
36+
- \[`pyupgrade`\] Properly trigger `super` change in nested class (`UP008`) ([#22677](https://github.com/astral-sh/ruff/pull/22677))
37+
- \[`ruff`\] Avoid syntax errors in `RUF036` fixes ([#23764](https://github.com/astral-sh/ruff/pull/23764))
38+
39+
### Rule changes
40+
41+
- \[`flake8-bandit`\] Flag `S501` with `requests.request` ([#23873](https://github.com/astral-sh/ruff/pull/23873))
42+
- \[`flake8-executable`\] Fix WSL detection in non-Docker containers ([#22879](https://github.com/astral-sh/ruff/pull/22879))
43+
- \[`flake8-print`\] Ignore `pprint` calls with `stream=` ([#23787](https://github.com/astral-sh/ruff/pull/23787))
44+
45+
### Documentation
46+
47+
- Update docs for Markdown code block formatting ([#23871](https://github.com/astral-sh/ruff/pull/23871))
48+
- \[`flake8-bugbear`\] Fix misleading description for `B904` ([#23731](https://github.com/astral-sh/ruff/pull/23731))
49+
50+
### Contributors
51+
52+
- [@zsol](https://github.com/zsol)
53+
- [@carljm](https://github.com/carljm)
54+
- [@ntBre](https://github.com/ntBre)
55+
- [@Bortlesboat](https://github.com/Bortlesboat)
56+
- [@sososonia-cyber](https://github.com/sososonia-cyber)
57+
- [@chirizxc](https://github.com/chirizxc)
58+
- [@leandrobbraga](https://github.com/leandrobbraga)
59+
- [@11happy](https://github.com/11happy)
60+
- [@Acelogic](https://github.com/Acelogic)
61+
- [@anishgirianish](https://github.com/anishgirianish)
62+
- [@amyreese](https://github.com/amyreese)
63+
- [@xvchris](https://github.com/xvchris)
64+
- [@charliermarsh](https://github.com/charliermarsh)
65+
- [@getehen](https://github.com/getehen)
66+
- [@Dev-iL](https://github.com/Dev-iL)
67+
368
## 0.15.5
469

570
Released on 2026-03-05.

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.5/install.sh | sh
156-
powershell -c "irm https://astral.sh/ruff/0.15.5/install.ps1 | iex"
155+
curl -LsSf https://astral.sh/ruff/0.15.6/install.sh | sh
156+
powershell -c "irm https://astral.sh/ruff/0.15.6/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.5
189+
rev: v0.15.6
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.5"
3+
version = "0.15.6"
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.5"
3+
version = "0.15.6"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_linter/src/rules/airflow/rules/runtime_value_in_dag_or_task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use crate::{FixAvailability, Violation};
3737
/// dag = DAG(dag_id="my_dag", start_date=datetime(2024, 1, 1))
3838
/// ```
3939
#[derive(ViolationMetadata)]
40-
#[violation_metadata(preview_since = "NEXT_RUFF_VERSION")]
40+
#[violation_metadata(preview_since = "0.15.6")]
4141
pub(crate) struct Airflow3DagDynamicValue {
4242
function_name: String,
4343
}

crates/ruff_linter/src/rules/airflow/rules/variable_get_outside_task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use crate::rules::airflow::helpers::is_airflow_task;
5454
/// )
5555
/// ```
5656
#[derive(ViolationMetadata)]
57-
#[violation_metadata(preview_since = "NEXT_RUFF_VERSION")]
57+
#[violation_metadata(preview_since = "0.15.6")]
5858
pub(crate) struct AirflowVariableGetOutsideTask {
5959
in_function: bool,
6060
}

crates/ruff_linter/src/rules/flake8_bugbear/rules/delattr_with_constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use crate::{AlwaysFixableViolation, Applicability, Edit, Fix};
4444
/// ## References
4545
/// - [Python documentation: `delattr`](https://docs.python.org/3/library/functions.html#delattr)
4646
#[derive(ViolationMetadata)]
47-
#[violation_metadata(preview_since = "NEXT_RUFF_VERSION")]
47+
#[violation_metadata(preview_since = "0.15.6")]
4848
pub(crate) struct DelAttrWithConstant;
4949

5050
impl AlwaysFixableViolation for DelAttrWithConstant {

crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use crate::{Edit, Fix, FixAvailability, Violation};
3636
/// - `lint.flake8-tidy-imports.require-lazy`
3737
/// - `lint.flake8-tidy-imports.ban-lazy`
3838
#[derive(ViolationMetadata)]
39-
#[violation_metadata(preview_since = "NEXT_RUFF_VERSION")]
39+
#[violation_metadata(preview_since = "0.15.6")]
4040
pub(crate) struct LazyImportMismatch {
4141
policy: LazyImportPolicy,
4242
name: Option<String>,

crates/ruff_linter/src/rules/ruff/rules/os_path_commonprefix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use crate::{Edit, Fix, FixAvailability, Violation};
4141
/// - [Why `os.path.commonprefix` is deprecated](https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix)
4242
/// - [CPython deprecation issue](https://github.com/python/cpython/issues/144347)
4343
#[derive(ViolationMetadata)]
44-
#[violation_metadata(preview_since = "NEXT_RUFF_VERSION")]
44+
#[violation_metadata(preview_since = "0.15.6")]
4545
pub(crate) struct OsPathCommonprefix;
4646

4747
impl Violation for OsPathCommonprefix {

0 commit comments

Comments
 (0)