Commit a388ef5
authored
Build(deps-dev): bump ruff from 0.9.10 to 0.10.0 (#219)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.10 to 0.10.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.10.0</h2>
<h2>Release Notes</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.10.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>
<p><strong>Changes to how the Python version is inferred when a
<code>target-version</code> is not specified</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16319">#16319</a>)</p>
<p>In previous versions of Ruff, you could specify your Python version
with:</p>
<ul>
<li>The <code>target-version</code> option in a <code>ruff.toml</code>
file or the <code>[tool.ruff]</code> section of a pyproject.toml
file.</li>
<li>The <code>project.requires-python</code> field in a
<code>pyproject.toml</code> file with a <code>[tool.ruff]</code>
section.</li>
</ul>
<p>These options worked well in most cases, and are still recommended
for fine control of the Python version. However, because of the way Ruff
discovers config files, <code>pyproject.toml</code> files without a
<code>[tool.ruff]</code> section would be ignored, including the
<code>requires-python</code> setting. Ruff would then use the default
Python version (3.9 as of this writing) instead, which is surprising
when you've attempted to request another version.</p>
<p>In v0.10, config discovery has been updated to address this
issue:</p>
<ul>
<li>If Ruff finds a <code>ruff.toml</code> file without a
<code>target-version</code>, it will check
for a <code>pyproject.toml</code> file in the same directory and respect
its
<code>requires-python</code> version, even if it does not contain a
<code>[tool.ruff]</code>
section.</li>
<li>If Ruff finds a user-level configuration, the
<code>requires-python</code> field of the closest
<code>pyproject.toml</code> in a parent directory will take
precedence.</li>
<li>If there is no config file (<code>ruff.toml</code>or
<code>pyproject.toml</code> with a
<code>[tool.ruff]</code> section) in the directory of the file being
checked, Ruff will
search for the closest <code>pyproject.toml</code> in the parent
directories and use its
<code>requires-python</code> setting.</li>
</ul>
</li>
<li>
<p><strong>Updated <code>TYPE_CHECKING</code> behavior</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16669">#16669</a>)</p>
<p>Previously, Ruff only recognized typechecking blocks that tested the
<code>typing.TYPE_CHECKING</code> symbol. Now, Ruff recognizes any local
variable named <code>TYPE_CHECKING</code>. This release also removes
support for the legacy <code>if 0:</code> and <code>if False:</code>
typechecking checks. Use a local <code>TYPE_CHECKING</code> variable
instead.</p>
</li>
<li>
<p><strong>More robust noqa parsing</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16483">#16483</a>)</p>
<p>The syntax for both file-level and in-line suppression comments has
been unified and made more robust to certain errors. In most cases, this
will result in more suppression comments being read by Ruff, but there
are a few instances where previously read comments will now log an error
to the user instead. Please refer to the documentation on <a
href="https://docs.astral.sh/ruff/linter/#error-suppression"><em>Error
suppression</em></a> for the full specification.</p>
</li>
<li>
<p><strong>Avoid unnecessary parentheses around with statements with a
single context manager and a trailing comment</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14005">#14005</a>)</p>
<p>This change fixes a bug in the formatter where it introduced
unnecessary parentheses around with statements with a single context
manager and a trailing comment. This change may result in a change in
formatting for some users.</p>
</li>
<li>
<p><strong>Bump alpine default tag to 3.21 for derived Docker
images</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16456">#16456</a>)</p>
<p>Alpine 3.21 was released in Dec 2024 and is used in the official
Alpine-based Python images. Now the ruff:alpine image will use 3.21
instead of 3.20 and ruff:alpine3.20 will no longer be updated.</p>
</li>
</ul>
<h3>Deprecated Rules</h3>
<p>The following rules have been deprecated:</p>
<!-- 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.10.0</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.10.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>
<p><strong>Changes to how the Python version is inferred when a
<code>target-version</code> is not specified</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16319">#16319</a>)</p>
<p>In previous versions of Ruff, you could specify your Python version
with:</p>
<ul>
<li>The <code>target-version</code> option in a <code>ruff.toml</code>
file or the <code>[tool.ruff]</code> section of a pyproject.toml
file.</li>
<li>The <code>project.requires-python</code> field in a
<code>pyproject.toml</code> file with a <code>[tool.ruff]</code>
section.</li>
</ul>
<p>These options worked well in most cases, and are still recommended
for fine control of the Python version. However, because of the way Ruff
discovers config files, <code>pyproject.toml</code> files without a
<code>[tool.ruff]</code> section would be ignored, including the
<code>requires-python</code> setting. Ruff would then use the default
Python version (3.9 as of this writing) instead, which is surprising
when you've attempted to request another version.</p>
<p>In v0.10, config discovery has been updated to address this
issue:</p>
<ul>
<li>If Ruff finds a <code>ruff.toml</code> file without a
<code>target-version</code>, it will check
for a <code>pyproject.toml</code> file in the same directory and respect
its
<code>requires-python</code> version, even if it does not contain a
<code>[tool.ruff]</code>
section.</li>
<li>If Ruff finds a user-level configuration, the
<code>requires-python</code> field of the closest
<code>pyproject.toml</code> in a parent directory will take
precedence.</li>
<li>If there is no config file (<code>ruff.toml</code>or
<code>pyproject.toml</code> with a
<code>[tool.ruff]</code> section) in the directory of the file being
checked, Ruff will
search for the closest <code>pyproject.toml</code> in the parent
directories and use its
<code>requires-python</code> setting.</li>
</ul>
</li>
<li>
<p><strong>Updated <code>TYPE_CHECKING</code> behavior</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16669">#16669</a>)</p>
<p>Previously, Ruff only recognized typechecking blocks that tested the
<code>typing.TYPE_CHECKING</code> symbol. Now, Ruff recognizes any local
variable named <code>TYPE_CHECKING</code>. This release also removes
support for the legacy <code>if 0:</code> and <code>if False:</code>
typechecking checks. Use a local <code>TYPE_CHECKING</code> variable
instead.</p>
</li>
<li>
<p><strong>More robust noqa parsing</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16483">#16483</a>)</p>
<p>The syntax for both file-level and in-line suppression comments has
been unified and made more robust to certain errors. In most cases, this
will result in more suppression comments being read by Ruff, but there
are a few instances where previously read comments will now log an error
to the user instead. Please refer to the documentation on <a
href="https://docs.astral.sh/ruff/linter/#error-suppression"><em>Error
suppression</em></a> for the full specification.</p>
</li>
<li>
<p><strong>Avoid unnecessary parentheses around with statements with a
single context manager and a trailing comment</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14005">#14005</a>)</p>
<p>This change fixes a bug in the formatter where it introduced
unnecessary parentheses around with statements with a single context
manager and a trailing comment. This change may result in a change in
formatting for some users.</p>
</li>
<li>
<p><strong>Bump alpine default tag to 3.21 for derived Docker
images</strong> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16456">#16456</a>)</p>
<p>Alpine 3.21 was released in Dec 2024 and is used in the official
Alpine-based Python images. Now the ruff:alpine image will use 3.21
instead of 3.20 and ruff:alpine3.20 will no longer be updated.</p>
</li>
</ul>
<h3>Deprecated Rules</h3>
<p>The following rules have been deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/non-pep604-isinstance/"><code>non-pep604-isinstance</code></a>
(<code>UP038</code>)</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/27e9d1fe3e60a0b6731ba3be103a48a33b8e3a7c"><code>27e9d1f</code></a>
Ruff v0.10 Release (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16708">#16708</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/acf35c55f8b8f5ce16ac388e7f6a1af884edbe16"><code>acf35c5</code></a>
Add new <code>noqa</code> specification to the docs (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16703">#16703</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b9b256209bee472c65a45ecd3b7e5cc34653a9bf"><code>b9b2562</code></a>
describe requires-python fallback in docs (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16704">#16704</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/abaa18993b285a183ba326cf92ab4e5ba0199cea"><code>abaa189</code></a>
[red-knot] handle cycles in MRO/bases resolution (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16693">#16693</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/360ba095ffc7dbbdb175fbaab011c25bcb4ae48a"><code>360ba09</code></a>
[red-knot] Auto generate statement nodes (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16645">#16645</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d8159e816f161df90b35a8c569d93b9381568b9f"><code>d8159e8</code></a>
[<code>pylint</code>] Better inference for <code>str.strip</code>
(<code>PLE310</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16671">#16671</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/04ad562afd8a08ba0863780f855ebf39446effff"><code>04ad562</code></a>
[<code>pylint</code>] Improve <code>repeated-equality-comparison</code>
fix to use a <code>set</code> when all...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/91674718c41e4e11beeaa38c78a368760137e2b8"><code>9167471</code></a>
[<code>pylint</code>/<code>pep8-naming</code>] Check
<code>__new__</code> argument name in `bad-staticmethod-a...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/348815d6d6c1e126ac2175463233de4c56c763eb"><code>348815d</code></a>
[<code>flake8-pyi</code>] Stabilize fix for
<code>unused-private-type-var</code> (<code>PYI018</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16682">#16682</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1326d55c291fb563cc6c16b11c358d5e9f12e8bd"><code>1326d55</code></a>
[<code>flake8-bandit</code>] Deprecate
<code>suspicious-xmle-tree-usage</code> (<code>S320</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16680">#16680</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.9.10...0.10.0">compare
view</a></li>
</ul>
</details>
<br />
[](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>2 files changed
+21
-21
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments