From b84ab572f1c80c9f7a23baff9cfdbe3b6bce4f51 Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Thu, 27 Feb 2025 08:38:11 -0500 Subject: [PATCH 1/2] Bump version to 0.9.8 --- CHANGELOG.md | 95 +++++++++++++++++++++---------- Cargo.lock | 6 +- README.md | 6 +- crates/ruff/Cargo.toml | 2 +- crates/ruff_linter/Cargo.toml | 2 +- crates/ruff_wasm/Cargo.toml | 2 +- docs/integrations.md | 8 +-- docs/tutorial.md | 2 +- pyproject.toml | 2 +- scripts/benchmarks/pyproject.toml | 2 +- 10 files changed, 80 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7743134bc5b59..f997b5269022a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## 0.9.8 + +### Preview features + +- Start detecting version-related syntax errors in the parser ([#16090](https://github.com/astral-sh/ruff/pull/16090)) + +### Rule changes + +- \[`pylint`\] Mark fix unsafe (`PLW1507`) ([#16343](https://github.com/astral-sh/ruff/pull/16343)) +- \[`pylint`\] Catch `case np.nan`/`case math.nan` in `match` statements (`PLW0177`) ([#16378](https://github.com/astral-sh/ruff/pull/16378)) +- \[`ruff`\] Add more Pydantic models variants to the list of default copy semantics (`RUF012`) ([#16291](https://github.com/astral-sh/ruff/pull/16291)) + +### Server + +- Avoid indexing the project if `configurationPreference` is `editorOnly` ([#16381](https://github.com/astral-sh/ruff/pull/16381)) +- Avoid unnecessary info at non-trace server log level ([#16389](https://github.com/astral-sh/ruff/pull/16389)) +- Expand `ruff.configuration` to allow inline config ([#16296](https://github.com/astral-sh/ruff/pull/16296)) +- Notify users for invalid client settings ([#16361](https://github.com/astral-sh/ruff/pull/16361)) + +### Configuration + +- Add `per-file-target-version` option ([#16257](https://github.com/astral-sh/ruff/pull/16257)) + +### Bug fixes + +- \[`refurb`\] Do not consider docstring(s) (`FURB156`) ([#16391](https://github.com/astral-sh/ruff/pull/16391)) +- \[`flake8-self`\] Ignore attribute accesses on instance-like variables (`SLF001`) ([#16149](https://github.com/astral-sh/ruff/pull/16149)) +- \[`pylint`\] Fix false positives, add missing methods, and support positional-only parameters (`PLE0302`) ([#16263](https://github.com/astral-sh/ruff/pull/16263)) +- \[`flake8-pyi`\] Mark `PYI030` fix unsafe when comments are deleted ([#16322](https://github.com/astral-sh/ruff/pull/16322)) + +### Documentation + +- Fix example for `S611` ([#16316](https://github.com/astral-sh/ruff/pull/16316)) +- Normalize inconsistent markdown headings in docstrings ([#16364](https://github.com/astral-sh/ruff/pull/16364)) +- Document MSRV policy ([#16384](https://github.com/astral-sh/ruff/pull/16384)) + ## 0.9.7 ### Preview features @@ -323,7 +359,7 @@ This release doesn’t remove or remap any existing stable rules. The following rules have been stabilized and are no longer in preview: - [`stdlib-module-shadowing`](https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/) (`A005`). - This rule has also been renamed: previously, it was called `builtin-module-shadowing`. +This rule has also been renamed: previously, it was called `builtin-module-shadowing`. - [`builtin-lambda-argument-shadowing`](https://docs.astral.sh/ruff/rules/builtin-lambda-argument-shadowing/) (`A006`) - [`slice-to-remove-prefix-or-suffix`](https://docs.astral.sh/ruff/rules/slice-to-remove-prefix-or-suffix/) (`FURB188`) - [`boolean-chained-comparison`](https://docs.astral.sh/ruff/rules/boolean-chained-comparison/) (`PLR1716`) @@ -378,7 +414,7 @@ This release introduces the new 2025 stable style ([#13371](https://github.com/a ### Server - Improve the observability by removing the need for the ["trace" value](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#traceValue) to turn on or off logging. The server logging is solely controlled using the [`logLevel` server setting](https://docs.astral.sh/ruff/editors/settings/#loglevel) - which defaults to `info`. This addresses the issue where users were notified about an error and told to consult the log, but it didn’t contain any messages. ([#15232](https://github.com/astral-sh/ruff/pull/15232)) +which defaults to `info`. This addresses the issue where users were notified about an error and told to consult the log, but it didn’t contain any messages. ([#15232](https://github.com/astral-sh/ruff/pull/15232)) - Ignore diagnostics from other sources for code action requests ([#15373](https://github.com/astral-sh/ruff/pull/15373)) ### CLI @@ -609,27 +645,24 @@ Check out the [blog post](https://astral.sh/blog/ruff-v0.8.0) for a migration gu See also, the "Remapped rules" section which may result in disabled rules. - **Default to Python 3.9** - - Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using [`ruff.target-version`](https://docs.astral.sh/ruff/settings/#target-version) or [`project.requires-python`](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#python-requires) ([#13896](https://github.com/astral-sh/ruff/pull/13896)) - + + Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using [`ruff.target-version`](https://docs.astral.sh/ruff/settings/#target-version) or [`project.requires-python`](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#python-requires) ([#13896](https://github.com/astral-sh/ruff/pull/13896)) - **Changed location of `pydoclint` diagnostics** - - [`pydoclint`](https://docs.astral.sh/ruff/rules/#pydoclint-doc) diagnostics now point to the first-line of the problematic docstring. Previously, this was not the case. - - If you've opted into these preview rules but have them suppressed using - [`noqa`](https://docs.astral.sh/ruff/linter/#error-suppression) comments in - some places, this change may mean that you need to move the `noqa` suppression - comments. Most users should be unaffected by this change. - + + [`pydoclint`](https://docs.astral.sh/ruff/rules/#pydoclint-doc) diagnostics now point to the first-line of the problematic docstring. Previously, this was not the case. + + If you've opted into these preview rules but have them suppressed using +[`noqa`](https://docs.astral.sh/ruff/linter/#error-suppression) comments in +some places, this change may mean that you need to move the `noqa` suppression +comments. Most users should be unaffected by this change. - **Use XDG (i.e. `~/.local/bin`) instead of the Cargo home directory in the standalone installer** - - Previously, Ruff's installer used `$CARGO_HOME` or `~/.cargo/bin` for its target install directory. Now, Ruff will be installed into `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` (in that order). - - This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected. - + + Previously, Ruff's installer used `$CARGO_HOME` or `~/.cargo/bin` for its target install directory. Now, Ruff will be installed into `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` (in that order). + + This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected. - **Changes to the line width calculation** - - Ruff now uses a new version of the [unicode-width](https://github.com/unicode-rs/unicode-width) Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before ([`E501`](https://docs.astral.sh/ruff/rules/line-too-long/)). + + Ruff now uses a new version of the [unicode-width](https://github.com/unicode-rs/unicode-width) Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before ([`E501`](https://docs.astral.sh/ruff/rules/line-too-long/)). ### Removed Rules @@ -843,15 +876,15 @@ Check out the [blog post](https://astral.sh/blog/ruff-v0.7.0) for a migration gu ### Breaking changes - The pytest rules `PT001` and `PT023` now default to omitting the decorator parentheses when there are no arguments - ([#12838](https://github.com/astral-sh/ruff/pull/12838), [#13292](https://github.com/astral-sh/ruff/pull/13292)). - This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part. - See the [blog post](https://astral.sh/blog/ruff-v0.7.0) for more details. +([#12838](https://github.com/astral-sh/ruff/pull/12838), [#13292](https://github.com/astral-sh/ruff/pull/13292)). +This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part. +See the [blog post](https://astral.sh/blog/ruff-v0.7.0) for more details. - The `useless-try-except` rule (in our `tryceratops` category) has been recoded from `TRY302` to - `TRY203` ([#13502](https://github.com/astral-sh/ruff/pull/13502)). This ensures Ruff's code is consistent with - the same rule in the [`tryceratops`](https://github.com/guilatrova/tryceratops) linter. +`TRY203` ([#13502](https://github.com/astral-sh/ruff/pull/13502)). This ensures Ruff's code is consistent with +the same rule in the [`tryceratops`](https://github.com/guilatrova/tryceratops) linter. - The `lint.allow-unused-imports` setting has been removed ([#13677](https://github.com/astral-sh/ruff/pull/13677)). Use - [`lint.pyflakes.allow-unused-imports`](https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports) - instead. +[`lint.pyflakes.allow-unused-imports`](https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports) +instead. ### Formatter preview style @@ -870,7 +903,7 @@ Check out the [blog post](https://astral.sh/blog/ruff-v0.7.0) for a migration gu - \[`flake8-todos`\] Only flag the word "TODO", not words starting with "todo" (`TD006`) ([#13640](https://github.com/astral-sh/ruff/pull/13640)) - \[`pycodestyle`\] Fix whitespace-related false positives and false negatives inside type-parameter lists (`E231`, `E251`) ([#13704](https://github.com/astral-sh/ruff/pull/13704)) - \[`flake8-simplify`\] Stabilize preview behavior for `SIM115` so that the rule can detect files - being opened from a wider range of standard-library functions ([#12959](https://github.com/astral-sh/ruff/pull/12959)). +being opened from a wider range of standard-library functions ([#12959](https://github.com/astral-sh/ruff/pull/12959)). ### CLI @@ -3386,9 +3419,9 @@ Read Ruff's new [versioning policy](https://docs.astral.sh/ruff/versioning/). - Unsafe fixes are no longer displayed or applied without opt-in ([#7769](https://github.com/astral-sh/ruff/pull/7769)) - Drop formatting specific rules from the default set ([#7900](https://github.com/astral-sh/ruff/pull/7900)) - The deprecated `format` setting has been removed ([#7984](https://github.com/astral-sh/ruff/pull/7984)) - - The `format` setting cannot be used to configure the output format, use `output-format` instead - - The `RUFF_FORMAT` environment variable is ignored, use `RUFF_OUTPUT_FORMAT` instead - - The `--format` option has been removed from `ruff check`, use `--output-format` instead + - The `format` setting cannot be used to configure the output format, use `output-format` instead + - The `RUFF_FORMAT` environment variable is ignored, use `RUFF_OUTPUT_FORMAT` instead + - The `--format` option has been removed from `ruff check`, use `--output-format` instead ### Rule changes diff --git a/Cargo.lock b/Cargo.lock index 521f279fa904a..4bcd9e09f791b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2656,7 +2656,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.9.7" +version = "0.9.8" dependencies = [ "anyhow", "argfile", @@ -2890,7 +2890,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.9.7" +version = "0.9.8" dependencies = [ "aho-corasick", "anyhow", @@ -3210,7 +3210,7 @@ dependencies = [ [[package]] name = "ruff_wasm" -version = "0.9.7" +version = "0.9.8" dependencies = [ "console_error_panic_hook", "console_log", diff --git a/README.md b/README.md index c21fd45717ede..c241f0cc8eb2a 100644 --- a/README.md +++ b/README.md @@ -149,8 +149,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.9.7/install.sh | sh -powershell -c "irm https://astral.sh/ruff/0.9.7/install.ps1 | iex" +curl -LsSf https://astral.sh/ruff/0.9.8/install.sh | sh +powershell -c "irm https://astral.sh/ruff/0.9.8/install.ps1 | iex" ``` You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff), @@ -183,7 +183,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.9.7 + rev: v0.9.8 hooks: # Run the linter. - id: ruff diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index a5efc9576ea78..982bdf506e4be 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff" -version = "0.9.7" +version = "0.9.8" publish = true authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index 191a0405a8b41..2be1fe893cb24 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_linter" -version = "0.9.7" +version = "0.9.8" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_wasm/Cargo.toml b/crates/ruff_wasm/Cargo.toml index ccfadaef7f853..ed6f1398b8b29 100644 --- a/crates/ruff_wasm/Cargo.toml +++ b/crates/ruff_wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_wasm" -version = "0.9.7" +version = "0.9.8" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/docs/integrations.md b/docs/integrations.md index 3e9150a3853ac..b9e3ec0068d81 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.9.7-alpine + name: ghcr.io/astral-sh/ruff:0.9.8-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.9.7 + rev: v0.9.8 hooks: # Run the linter. - id: ruff @@ -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.9.7 + rev: v0.9.8 hooks: # Run the linter. - id: ruff @@ -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.9.7 + rev: v0.9.8 hooks: # Run the linter. - id: ruff diff --git a/docs/tutorial.md b/docs/tutorial.md index e5a74f9b63a6b..3e3d29674d60f 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -365,7 +365,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.9.7 + rev: v0.9.8 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index ad597d1bde86d..4e0928cd4147f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.9.7" +version = "0.9.8" 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 f79ea7b637ee6..114f7806f424d 100644 --- a/scripts/benchmarks/pyproject.toml +++ b/scripts/benchmarks/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scripts" -version = "0.9.7" +version = "0.9.8" description = "" authors = ["Charles Marsh "] From e0d7287db1f6f2ff49b2815fe438e49722252a36 Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Thu, 27 Feb 2025 08:44:49 -0500 Subject: [PATCH 2/2] Revert changelog reformat --- CHANGELOG.md | 59 +++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f997b5269022a..e6b83286600d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -359,7 +359,7 @@ This release doesn’t remove or remap any existing stable rules. The following rules have been stabilized and are no longer in preview: - [`stdlib-module-shadowing`](https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/) (`A005`). -This rule has also been renamed: previously, it was called `builtin-module-shadowing`. + This rule has also been renamed: previously, it was called `builtin-module-shadowing`. - [`builtin-lambda-argument-shadowing`](https://docs.astral.sh/ruff/rules/builtin-lambda-argument-shadowing/) (`A006`) - [`slice-to-remove-prefix-or-suffix`](https://docs.astral.sh/ruff/rules/slice-to-remove-prefix-or-suffix/) (`FURB188`) - [`boolean-chained-comparison`](https://docs.astral.sh/ruff/rules/boolean-chained-comparison/) (`PLR1716`) @@ -414,7 +414,7 @@ This release introduces the new 2025 stable style ([#13371](https://github.com/a ### Server - Improve the observability by removing the need for the ["trace" value](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#traceValue) to turn on or off logging. The server logging is solely controlled using the [`logLevel` server setting](https://docs.astral.sh/ruff/editors/settings/#loglevel) -which defaults to `info`. This addresses the issue where users were notified about an error and told to consult the log, but it didn’t contain any messages. ([#15232](https://github.com/astral-sh/ruff/pull/15232)) + which defaults to `info`. This addresses the issue where users were notified about an error and told to consult the log, but it didn’t contain any messages. ([#15232](https://github.com/astral-sh/ruff/pull/15232)) - Ignore diagnostics from other sources for code action requests ([#15373](https://github.com/astral-sh/ruff/pull/15373)) ### CLI @@ -645,24 +645,27 @@ Check out the [blog post](https://astral.sh/blog/ruff-v0.8.0) for a migration gu See also, the "Remapped rules" section which may result in disabled rules. - **Default to Python 3.9** - - Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using [`ruff.target-version`](https://docs.astral.sh/ruff/settings/#target-version) or [`project.requires-python`](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#python-requires) ([#13896](https://github.com/astral-sh/ruff/pull/13896)) + + Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version is configured using [`ruff.target-version`](https://docs.astral.sh/ruff/settings/#target-version) or [`project.requires-python`](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#python-requires) ([#13896](https://github.com/astral-sh/ruff/pull/13896)) + - **Changed location of `pydoclint` diagnostics** - - [`pydoclint`](https://docs.astral.sh/ruff/rules/#pydoclint-doc) diagnostics now point to the first-line of the problematic docstring. Previously, this was not the case. - - If you've opted into these preview rules but have them suppressed using -[`noqa`](https://docs.astral.sh/ruff/linter/#error-suppression) comments in -some places, this change may mean that you need to move the `noqa` suppression -comments. Most users should be unaffected by this change. + + [`pydoclint`](https://docs.astral.sh/ruff/rules/#pydoclint-doc) diagnostics now point to the first-line of the problematic docstring. Previously, this was not the case. + + If you've opted into these preview rules but have them suppressed using + [`noqa`](https://docs.astral.sh/ruff/linter/#error-suppression) comments in + some places, this change may mean that you need to move the `noqa` suppression + comments. Most users should be unaffected by this change. + - **Use XDG (i.e. `~/.local/bin`) instead of the Cargo home directory in the standalone installer** - - Previously, Ruff's installer used `$CARGO_HOME` or `~/.cargo/bin` for its target install directory. Now, Ruff will be installed into `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` (in that order). - - This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected. + + Previously, Ruff's installer used `$CARGO_HOME` or `~/.cargo/bin` for its target install directory. Now, Ruff will be installed into `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` (in that order). + + This change is only relevant to users of the standalone Ruff installer (using the shell or PowerShell script). If you installed Ruff using uv or pip, you should be unaffected. + - **Changes to the line width calculation** - - Ruff now uses a new version of the [unicode-width](https://github.com/unicode-rs/unicode-width) Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before ([`E501`](https://docs.astral.sh/ruff/rules/line-too-long/)). + + Ruff now uses a new version of the [unicode-width](https://github.com/unicode-rs/unicode-width) Rust crate to calculate the line width. In very rare cases, this may lead to lines containing Unicode characters being reformatted, or being considered too long when they were not before ([`E501`](https://docs.astral.sh/ruff/rules/line-too-long/)). ### Removed Rules @@ -876,15 +879,15 @@ Check out the [blog post](https://astral.sh/blog/ruff-v0.7.0) for a migration gu ### Breaking changes - The pytest rules `PT001` and `PT023` now default to omitting the decorator parentheses when there are no arguments -([#12838](https://github.com/astral-sh/ruff/pull/12838), [#13292](https://github.com/astral-sh/ruff/pull/13292)). -This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part. -See the [blog post](https://astral.sh/blog/ruff-v0.7.0) for more details. + ([#12838](https://github.com/astral-sh/ruff/pull/12838), [#13292](https://github.com/astral-sh/ruff/pull/13292)). + This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part. + See the [blog post](https://astral.sh/blog/ruff-v0.7.0) for more details. - The `useless-try-except` rule (in our `tryceratops` category) has been recoded from `TRY302` to -`TRY203` ([#13502](https://github.com/astral-sh/ruff/pull/13502)). This ensures Ruff's code is consistent with -the same rule in the [`tryceratops`](https://github.com/guilatrova/tryceratops) linter. + `TRY203` ([#13502](https://github.com/astral-sh/ruff/pull/13502)). This ensures Ruff's code is consistent with + the same rule in the [`tryceratops`](https://github.com/guilatrova/tryceratops) linter. - The `lint.allow-unused-imports` setting has been removed ([#13677](https://github.com/astral-sh/ruff/pull/13677)). Use -[`lint.pyflakes.allow-unused-imports`](https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports) -instead. + [`lint.pyflakes.allow-unused-imports`](https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports) + instead. ### Formatter preview style @@ -903,7 +906,7 @@ instead. - \[`flake8-todos`\] Only flag the word "TODO", not words starting with "todo" (`TD006`) ([#13640](https://github.com/astral-sh/ruff/pull/13640)) - \[`pycodestyle`\] Fix whitespace-related false positives and false negatives inside type-parameter lists (`E231`, `E251`) ([#13704](https://github.com/astral-sh/ruff/pull/13704)) - \[`flake8-simplify`\] Stabilize preview behavior for `SIM115` so that the rule can detect files -being opened from a wider range of standard-library functions ([#12959](https://github.com/astral-sh/ruff/pull/12959)). + being opened from a wider range of standard-library functions ([#12959](https://github.com/astral-sh/ruff/pull/12959)). ### CLI @@ -3419,9 +3422,9 @@ Read Ruff's new [versioning policy](https://docs.astral.sh/ruff/versioning/). - Unsafe fixes are no longer displayed or applied without opt-in ([#7769](https://github.com/astral-sh/ruff/pull/7769)) - Drop formatting specific rules from the default set ([#7900](https://github.com/astral-sh/ruff/pull/7900)) - The deprecated `format` setting has been removed ([#7984](https://github.com/astral-sh/ruff/pull/7984)) - - The `format` setting cannot be used to configure the output format, use `output-format` instead - - The `RUFF_FORMAT` environment variable is ignored, use `RUFF_OUTPUT_FORMAT` instead - - The `--format` option has been removed from `ruff check`, use `--output-format` instead + - The `format` setting cannot be used to configure the output format, use `output-format` instead + - The `RUFF_FORMAT` environment variable is ignored, use `RUFF_OUTPUT_FORMAT` instead + - The `--format` option has been removed from `ruff check`, use `--output-format` instead ### Rule changes