Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump ruff from 0.8.6 to 0.9.0 (#460)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.6 to 0.9.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.9.0</h2> <h2>Release Notes</h2> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.9.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <p>Ruff now formats your code according to the 2025 style guide. As a result, your code might now get formatted differently. See the formatter section for a detailed list of changes.</p> <p>This release doesn’t remove or remap any existing stable rules.</p> <h3>Stabilization</h3> <p>The following rules have been stabilized and are no longer in preview:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/"><code>stdlib-module-shadowing</code></a> (<code>A005</code>). This rule has also been renamed: previously, it was called <code>builtin-module-shadowing</code>.</li> <li><a href="https://docs.astral.sh/ruff/rules/builtin-lambda-argument-shadowing/"><code>builtin-lambda-argument-shadowing</code></a> (<code>A006</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/slice-to-remove-prefix-or-suffix/"><code>slice-to-remove-prefix-or-suffix</code></a> (<code>FURB188</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/boolean-chained-comparison/"><code>boolean-chained-comparison</code></a> (<code>PLR1716</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/decimal-from-float-literal/"><code>decimal-from-float-literal</code></a> (<code>RUF032</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/post-init-default/"><code>post-init-default</code></a> (<code>RUF033</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/useless-if-else/"><code>useless-if-else</code></a> (<code>RUF034</code>)</li> </ul> <p>The following behaviors have been stabilized:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/pytest-parametrize-names-wrong-type/"><code>pytest-parametrize-names-wrong-type</code></a> (<code>PT006</code>): Detect <a href="https://docs.pytest.org/en/7.1.x/how-to/parametrize.html#parametrize"><code>pytest.parametrize</code></a> calls outside decorators and calls with keyword arguments.</li> <li><a href="https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/"><code>module-import-not-at-top-of-file</code></a> (<code>E402</code>): Ignore <a href="https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest-importorskip"><code>pytest.importorskip</code></a> calls between import statements.</li> <li><a href="https://docs.astral.sh/ruff/rules/mutable-dataclass-default/"><code>mutable-dataclass-default</code></a> (<code>RUF008</code>) and <a href="https://docs.astral.sh/ruff/rules/function-call-in-dataclass-default-argument/"><code>function-call-in-dataclass-default-argument</code></a> (<code>RUF009</code>): Add support for <a href="https://www.attrs.org/en/stable/"><code>attrs</code></a>.</li> <li><a href="https://docs.astral.sh/ruff/rules/bad-version-info-comparison/"><code>bad-version-info-comparison</code></a> (<code>PYI006</code>): Extend the rule to check non-stub files.</li> </ul> <p>The following fixes or improvements to fixes have been stabilized:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/redundant-numeric-union/"><code>redundant-numeric-union</code></a> (<code>PYI041</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/duplicate-union-member/"><code>duplicate-union-members</code></a> (<code>PYI016</code>)</li> </ul> <h3>Formatter</h3> <p>This release introduces the new 2025 stable style (<a href="https://redirect.github.com/astral-sh/ruff/issues/13371">#13371</a>), stabilizing the following changes:</p> <ul> <li>Format expressions in f-string elements (<a href="https://redirect.github.com/astral-sh/ruff/issues/7594">#7594</a>)</li> <li>Alternate quotes for strings inside f-strings (<a href="https://redirect.github.com/astral-sh/ruff/pull/13860">#13860</a>)</li> <li>Preserve the casing of hex codes in f-string debug expressions (<a href="https://redirect.github.com/astral-sh/ruff/issues/14766">#14766</a>)</li> <li>Choose the quote style for each string literal in an implicitly concatenated f-string rather than for the entire string (<a href="https://redirect.github.com/astral-sh/ruff/pull/13539">#13539</a>)</li> <li>Automatically join an implicitly concatenated string into a single string literal if it fits on a single line (<a href="https://redirect.github.com/astral-sh/ruff/issues/9457">#9457</a>)</li> <li>Remove the <a href="https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/"><code>ISC001</code></a> incompatibility warning (<a href="https://redirect.github.com/astral-sh/ruff/pull/15123">#15123</a>)</li> <li>Prefer parenthesizing the <code>assert</code> message over breaking the assertion expression (<a href="https://redirect.github.com/astral-sh/ruff/issues/9457">#9457</a>)</li> <li>Automatically parenthesize over-long <code>if</code> guards in <code>match</code> <code>case</code> clauses (<a href="https://redirect.github.com/astral-sh/ruff/pull/13513">#13513</a>)</li> <li>More consistent formatting for <code>match</code> <code>case</code> patterns (<a href="https://redirect.github.com/astral-sh/ruff/issues/6933">#6933</a>)</li> <li>Avoid unnecessary parentheses around return type annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/13381">#13381</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.9.0</h2> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.9.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <p>Ruff now formats your code according to the 2025 style guide. As a result, your code might now get formatted differently. See the formatter section for a detailed list of changes.</p> <p>This release doesn’t remove or remap any existing stable rules.</p> <h3>Stabilization</h3> <p>The following rules have been stabilized and are no longer in preview:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/"><code>stdlib-module-shadowing</code></a> (<code>A005</code>). This rule has also been renamed: previously, it was called <code>builtin-module-shadowing</code>.</li> <li><a href="https://docs.astral.sh/ruff/rules/builtin-lambda-argument-shadowing/"><code>builtin-lambda-argument-shadowing</code></a> (<code>A006</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/slice-to-remove-prefix-or-suffix/"><code>slice-to-remove-prefix-or-suffix</code></a> (<code>FURB188</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/boolean-chained-comparison/"><code>boolean-chained-comparison</code></a> (<code>PLR1716</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/decimal-from-float-literal/"><code>decimal-from-float-literal</code></a> (<code>RUF032</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/post-init-default/"><code>post-init-default</code></a> (<code>RUF033</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/useless-if-else/"><code>useless-if-else</code></a> (<code>RUF034</code>)</li> </ul> <p>The following behaviors have been stabilized:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/pytest-parametrize-names-wrong-type/"><code>pytest-parametrize-names-wrong-type</code></a> (<code>PT006</code>): Detect <a href="https://docs.pytest.org/en/7.1.x/how-to/parametrize.html#parametrize"><code>pytest.parametrize</code></a> calls outside decorators and calls with keyword arguments.</li> <li><a href="https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/"><code>module-import-not-at-top-of-file</code></a> (<code>E402</code>): Ignore <a href="https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest-importorskip"><code>pytest.importorskip</code></a> calls between import statements.</li> <li><a href="https://docs.astral.sh/ruff/rules/mutable-dataclass-default/"><code>mutable-dataclass-default</code></a> (<code>RUF008</code>) and <a href="https://docs.astral.sh/ruff/rules/function-call-in-dataclass-default-argument/"><code>function-call-in-dataclass-default-argument</code></a> (<code>RUF009</code>): Add support for <a href="https://www.attrs.org/en/stable/"><code>attrs</code></a>.</li> <li><a href="https://docs.astral.sh/ruff/rules/bad-version-info-comparison/"><code>bad-version-info-comparison</code></a> (<code>PYI006</code>): Extend the rule to check non-stub files.</li> </ul> <p>The following fixes or improvements to fixes have been stabilized:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/redundant-numeric-union/"><code>redundant-numeric-union</code></a> (<code>PYI041</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/duplicate-union-member/"><code>duplicate-union-members</code></a> (<code>PYI016</code>)</li> </ul> <h3>Formatter</h3> <p>This release introduces the new 2025 stable style (<a href="https://redirect.github.com/astral-sh/ruff/issues/13371">#13371</a>), stabilizing the following changes:</p> <ul> <li>Format expressions in f-string elements (<a href="https://redirect.github.com/astral-sh/ruff/issues/7594">#7594</a>)</li> <li>Alternate quotes for strings inside f-strings (<a href="https://redirect.github.com/astral-sh/ruff/pull/13860">#13860</a>)</li> <li>Preserve the casing of hex codes in f-string debug expressions (<a href="https://redirect.github.com/astral-sh/ruff/issues/14766">#14766</a>)</li> <li>Choose the quote style for each string literal in an implicitly concatenated f-string rather than for the entire string (<a href="https://redirect.github.com/astral-sh/ruff/pull/13539">#13539</a>)</li> <li>Automatically join an implicitly concatenated string into a single string literal if it fits on a single line (<a href="https://redirect.github.com/astral-sh/ruff/issues/9457">#9457</a>)</li> <li>Remove the <a href="https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/"><code>ISC001</code></a> incompatibility warning (<a href="https://redirect.github.com/astral-sh/ruff/pull/15123">#15123</a>)</li> <li>Prefer parenthesizing the <code>assert</code> message over breaking the assertion expression (<a href="https://redirect.github.com/astral-sh/ruff/issues/9457">#9457</a>)</li> <li>Automatically parenthesize over-long <code>if</code> guards in <code>match</code> <code>case</code> clauses (<a href="https://redirect.github.com/astral-sh/ruff/pull/13513">#13513</a>)</li> <li>More consistent formatting for <code>match</code> <code>case</code> patterns (<a href="https://redirect.github.com/astral-sh/ruff/issues/6933">#6933</a>)</li> <li>Avoid unnecessary parentheses around return type annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/13381">#13381</a>)</li> <li>Keep the opening parentheses on the same line as the <code>if</code> keyword for comprehensions where the condition has a leading comment (<a href="https://redirect.github.com/astral-sh/ruff/pull/12282">#12282</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/d0b2bbd55ee6435bc3dad8db2898aec216d85121"><code>d0b2bbd</code></a> Release 0.9.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/15371">#15371</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/8628f169e9e84a3b295a264a730ea365073b0c6a"><code>8628f16</code></a> [<code>ruff</code>] Stop parsing diagnostics from other sources for code action requests...</li> <li><a href="https://github.com/astral-sh/ruff/commit/8bc11c49b2faa8d7c92493ab3250c460de35ec97"><code>8bc11c4</code></a> [<code>flake8-django</code>] Recognize other magic methods (<code>DJ012</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/15365">#15365</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/bf5b0c2688d35625aee4c518cd872e4a9adc1b3e"><code>bf5b0c2</code></a> [red-knot] Minor refactor of red_knot_vendored/build.rs (<a href="https://redirect.github.com/astral-sh/ruff/issues/15372">#15372</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/097aa04c0496c50f8102dca5baf5ae14f43fb66d"><code>097aa04</code></a> [red-knot] Typeshed patching: use build.rs instead of workflow (<a href="https://redirect.github.com/astral-sh/ruff/issues/15370">#15370</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/f706c3fdf28155248a0170a2cb2a09650cab1fd1"><code>f706c3f</code></a> Add f-string formatting to the docs (<a href="https://redirect.github.com/astral-sh/ruff/issues/15367">#15367</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/29f66533185a9e796b9058e11ab2e0a9962b6b3c"><code>29f6653</code></a> [<code>ruff</code>] Stabilize <code>useless-if-else</code> (<code>RUF034</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/15351">#15351</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d645525afc3a5c995df0cfb00e44245f520804d1"><code>d645525</code></a> [<code>pylint</code>]: Stabilize <code>boolean-chained-comparison</code> (<code>PLR1716</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/15354">#15354</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/6dcf7b35b9ea5bb72775ca743e54bed3fe6238d2"><code>6dcf7b3</code></a> [<code>ruff</code>] Stabilize <code>post-init-default</code> (RUF033) (<a href="https://redirect.github.com/astral-sh/ruff/issues/15352">#15352</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/943d4fc1602af9695de1e8ddcc5c9b1e5512f912"><code>943d4fc</code></a> Update formatter preview documentation (<a href="https://redirect.github.com/astral-sh/ruff/issues/15349">#15349</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.8.6...0.9.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.8.6&new-version=0.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
- Loading branch information