diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a087c5aae..ec869ac446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## 0.15.12 + +Released on 2026-04-24. + +### Preview features + +- Implement `#ruff:file-ignore` file-level suppressions ([#23599](https://github.com/astral-sh/ruff/pull/23599)) +- Implement `#ruff:ignore` logical-line suppressions ([#23404](https://github.com/astral-sh/ruff/pull/23404)) +- Revert preview changes to displayed diagnostic severity in LSP ([#24789](https://github.com/astral-sh/ruff/pull/24789)) +- \[`airflow`\] Implement `task-branch-as-short-circuit` (`AIR004`) ([#23579](https://github.com/astral-sh/ruff/pull/23579)) +- \[`flake8-bugbear`\] Fix `break`/`continue` handling in `loop-iterator-mutation` (`B909`) ([#24440](https://github.com/astral-sh/ruff/pull/24440)) +- \[`pylint`\] Fix `PLC2701` for type parameter scopes ([#24576](https://github.com/astral-sh/ruff/pull/24576)) + +### Rule changes + +- \[`pandas-vet`\] Suggest `.array` as well in `PD011` ([#24805](https://github.com/astral-sh/ruff/pull/24805)) + +### CLI + +- Respect default Unix permissions for cache files ([#24794](https://github.com/astral-sh/ruff/pull/24794)) + +### Documentation + +- \[`pylint`\] Fix `PLR0124` description not to claim self-comparison always returns the same value ([#24749](https://github.com/astral-sh/ruff/pull/24749)) +- \[`pyupgrade`\] Expand docs on reusable `TypeVar`s and scoping (`UP046`) ([#24153](https://github.com/astral-sh/ruff/pull/24153)) +- Improve rules table accessibility ([#24711](https://github.com/astral-sh/ruff/pull/24711)) + +### Contributors + +- [@dylwil3](https://github.com/dylwil3) +- [@AlexWaygood](https://github.com/AlexWaygood) +- [@woodruffw](https://github.com/woodruffw) +- [@avasis-ai](https://github.com/avasis-ai) +- [@Dev-iL](https://github.com/Dev-iL) +- [@denyszhak](https://github.com/denyszhak) +- [@ShipItAndPray](https://github.com/ShipItAndPray) +- [@anishgirianish](https://github.com/anishgirianish) +- [@augustelalande](https://github.com/augustelalande) +- [@amyreese](https://github.com/amyreese) +- [@majiayu000](https://github.com/majiayu000) + ## 0.15.11 Released on 2026-04-16. diff --git a/Cargo.lock b/Cargo.lock index 50492ef7b6..bcc7728efe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2914,7 +2914,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.15.11" +version = "0.15.12" dependencies = [ "anyhow", "argfile", @@ -3175,7 +3175,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.15.11" +version = "0.15.12" dependencies = [ "aho-corasick", "anyhow", @@ -3551,7 +3551,7 @@ dependencies = [ [[package]] name = "ruff_wasm" -version = "0.15.11" +version = "0.15.12" dependencies = [ "console_error_panic_hook", "console_log", diff --git a/README.md b/README.md index 9d5179ba8a..847ed8894f 100644 --- a/README.md +++ b/README.md @@ -152,8 +152,8 @@ curl -LsSf https://astral.sh/ruff/install.sh | sh powershell -c "irm https://astral.sh/ruff/install.ps1 | iex" # For a specific version. -curl -LsSf https://astral.sh/ruff/0.15.11/install.sh | sh -powershell -c "irm https://astral.sh/ruff/0.15.11/install.ps1 | iex" +curl -LsSf https://astral.sh/ruff/0.15.12/install.sh | sh +powershell -c "irm https://astral.sh/ruff/0.15.12/install.ps1 | iex" ``` 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 ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.11 + rev: v0.15.12 hooks: # Run the linter. - id: ruff-check diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index 4ebe7a0ab5..814a95bffd 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff" -version = "0.15.11" +version = "0.15.12" publish = true authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index 64c3c876e3..164cab09e4 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_linter" -version = "0.15.11" +version = "0.15.12" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/src/rules/airflow/rules/task_branch_as_short_circuit.rs b/crates/ruff_linter/src/rules/airflow/rules/task_branch_as_short_circuit.rs index f0d6f8fc70..e47ac29a9d 100644 --- a/crates/ruff_linter/src/rules/airflow/rules/task_branch_as_short_circuit.rs +++ b/crates/ruff_linter/src/rules/airflow/rules/task_branch_as_short_circuit.rs @@ -70,7 +70,7 @@ use crate::rules::airflow::helpers::is_airflow_task_variant; /// task = ShortCircuitOperator(task_id="my_task", python_callable=my_callable) /// ``` #[derive(ViolationMetadata)] -#[violation_metadata(preview_since = "NEXT_RUFF_VERSION")] +#[violation_metadata(preview_since = "0.15.12")] pub(crate) struct AirflowTaskBranchAsShortCircuit { kind: BranchKind, } diff --git a/crates/ruff_wasm/Cargo.toml b/crates/ruff_wasm/Cargo.toml index d6733d044f..6674cda525 100644 --- a/crates/ruff_wasm/Cargo.toml +++ b/crates/ruff_wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_wasm" -version = "0.15.11" +version = "0.15.12" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/docs/formatter.md b/docs/formatter.md index 9cf23bde7c..527bf1e1c4 100644 --- a/docs/formatter.md +++ b/docs/formatter.md @@ -306,7 +306,7 @@ support needs to be explicitly included by adding it to `types_or`: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.11 + rev: v0.15.12 hooks: - id: ruff-format types_or: [python, pyi, jupyter, markdown] diff --git a/docs/integrations.md b/docs/integrations.md index dac6cc2e8c..fa252c2145 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -80,7 +80,7 @@ You can add the following configuration to `.gitlab-ci.yml` to run a `ruff forma stage: build interruptible: true image: - name: ghcr.io/astral-sh/ruff:0.15.11-alpine + name: ghcr.io/astral-sh/ruff:0.15.12-alpine before_script: - cd $CI_PROJECT_DIR - ruff --version @@ -106,7 +106,7 @@ Ruff can be used as a [pre-commit](https://pre-commit.com) hook via [`ruff-pre-c ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.11 + rev: v0.15.12 hooks: # Run the linter. - id: ruff-check @@ -119,7 +119,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.11 + rev: v0.15.12 hooks: # Run the linter. - id: ruff-check @@ -133,7 +133,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.11 + rev: v0.15.12 hooks: # Run the linter. - id: ruff-check diff --git a/docs/tutorial.md b/docs/tutorial.md index 8bb1853f34..697f070e86 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -369,7 +369,7 @@ This tutorial has focused on Ruff's command-line interface, but Ruff can also be ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.11 + rev: v0.15.12 hooks: # Run the linter. - id: ruff-check diff --git a/pyproject.toml b/pyproject.toml index f1c92e8166..62d80941b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.15.11" +version = "0.15.12" description = "An extremely fast Python linter and code formatter, written in Rust." authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }] readme = "README.md" diff --git a/scripts/benchmarks/pyproject.toml b/scripts/benchmarks/pyproject.toml index ab1440a28d..8dcfa7258a 100644 --- a/scripts/benchmarks/pyproject.toml +++ b/scripts/benchmarks/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scripts" -version = "0.15.11" +version = "0.15.12" description = "" authors = ["Charles Marsh "]