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.6.9 to 0.7.0 (#486)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.9 to 0.7.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.7.0</h2> <h2>Release Notes</h2> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.7.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <ul> <li>The pytest rules <code>PT001</code> and <code>PT023</code> now default to omitting the decorator parentheses when there are no arguments (<a href="https://redirect.github.com/astral-sh/ruff/pull/12838">#12838</a>, <a href="https://redirect.github.com/astral-sh/ruff/pull/13292">#13292</a>). 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 <a href="https://astral.sh/blog/ruff-v0.7.0">blog post</a> for more details.</li> <li>The <code>useless-try-except</code> rule (in our <code>tryceratops</code> category) has been recoded from <code>TRY302</code> to <code>TRY203</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/13502">#13502</a>). This ensures Ruff's code is consistent with the same rule in the <a href="https://github.com/guilatrova/tryceratops"><code>tryceratops</code></a> linter.</li> <li>The <code>lint.allow-unused-imports</code> setting has been removed (<a href="https://redirect.github.com/astral-sh/ruff/pull/13677">#13677</a>). Use <a href="https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports"><code>lint.pyflakes.allow-unused-imports</code></a> instead.</li> </ul> <h3>Formatter preview style</h3> <ul> <li>Normalize implicit concatenated f-string quotes per part (<a href="https://redirect.github.com/astral-sh/ruff/pull/13539">#13539</a>)</li> </ul> <h3>Preview linter features</h3> <ul> <li>[<code>refurb</code>] implement <code>hardcoded-string-charset</code> (FURB156) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13530">#13530</a>)</li> <li>[<code>refurb</code>] Count codepoints not bytes for <code>slice-to-remove-prefix-or-suffix (FURB188)</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/13631">#13631</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>pylint</code>] Mark <code>PLE1141</code> fix as unsafe (<a href="https://redirect.github.com/astral-sh/ruff/pull/13629">#13629</a>)</li> <li>[<code>flake8-async</code>] Consider async generators to be "checkpoints" for <code>cancel-scope-no-checkpoint</code> (<code>ASYNC100</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13639">#13639</a>)</li> <li>[<code>flake8-bugbear</code>] Do not suggest setting parameter <code>strict=</code> to <code>False</code> in <code>B905</code> diagnostic message (<a href="https://redirect.github.com/astral-sh/ruff/pull/13656">#13656</a>)</li> <li>[<code>flake8-todos</code>] Only flag the word "TODO", not words starting with "todo" (<code>TD006</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13640">#13640</a>)</li> <li>[<code>pycodestyle</code>] Fix whitespace-related false positives and false negatives inside type-parameter lists (<code>E231</code>, <code>E251</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13704">#13704</a>)</li> <li>[<code>flake8-simplify</code>] Stabilize preview behavior for <code>SIM115</code> so that the rule can detect files being opened from a wider range of standard-library functions (<a href="https://redirect.github.com/astral-sh/ruff/pull/12959">#12959</a>).</li> </ul> <h3>CLI</h3> <ul> <li>Add explanation of fixable in <code>--statistics</code> command (<a href="https://redirect.github.com/astral-sh/ruff/pull/13774">#13774</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>pyflakes</code>] Allow <code>ipytest</code> cell magic (<code>F401</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13745">#13745</a>)</li> <li>[<code>flake8-use-pathlib</code>] Fix <code>PTH123</code> false positive when <code>open</code> is passed a file descriptor (<a href="https://redirect.github.com/astral-sh/ruff/pull/13616">#13616</a>)</li> <li>[<code>flake8-bandit</code>] Detect patterns from multi line SQL statements (<code>S608</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13574">#13574</a>)</li> <li>[<code>flake8-pyi</code>] - Fix dropped expressions in <code>PYI030</code> autofix (<a href="https://redirect.github.com/astral-sh/ruff/pull/13727">#13727</a>)</li> </ul> <h2>Contributors</h2> <ul> <li><a href="https://github.com/AlexWaygood"><code>@AlexWaygood</code></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.7.0</h2> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.7.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <ul> <li>The pytest rules <code>PT001</code> and <code>PT023</code> now default to omitting the decorator parentheses when there are no arguments (<a href="https://redirect.github.com/astral-sh/ruff/pull/12838">#12838</a>, <a href="https://redirect.github.com/astral-sh/ruff/pull/13292">#13292</a>). 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 <a href="https://astral.sh/blog/ruff-v0.7.0">blog post</a> for more details.</li> <li>The <code>useless-try-except</code> rule (in our <code>tryceratops</code> category) has been recoded from <code>TRY302</code> to <code>TRY203</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/13502">#13502</a>). This ensures Ruff's code is consistent with the same rule in the <a href="https://github.com/guilatrova/tryceratops"><code>tryceratops</code></a> linter.</li> <li>The <code>lint.allow-unused-imports</code> setting has been removed (<a href="https://redirect.github.com/astral-sh/ruff/pull/13677">#13677</a>). Use <a href="https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports"><code>lint.pyflakes.allow-unused-imports</code></a> instead.</li> </ul> <h3>Formatter preview style</h3> <ul> <li>Normalize implicit concatenated f-string quotes per part (<a href="https://redirect.github.com/astral-sh/ruff/pull/13539">#13539</a>)</li> </ul> <h3>Preview linter features</h3> <ul> <li>[<code>refurb</code>] implement <code>hardcoded-string-charset</code> (FURB156) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13530">#13530</a>)</li> <li>[<code>refurb</code>] Count codepoints not bytes for <code>slice-to-remove-prefix-or-suffix (FURB188)</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/13631">#13631</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>pylint</code>] Mark <code>PLE1141</code> fix as unsafe (<a href="https://redirect.github.com/astral-sh/ruff/pull/13629">#13629</a>)</li> <li>[<code>flake8-async</code>] Consider async generators to be "checkpoints" for <code>cancel-scope-no-checkpoint</code> (<code>ASYNC100</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13639">#13639</a>)</li> <li>[<code>flake8-bugbear</code>] Do not suggest setting parameter <code>strict=</code> to <code>False</code> in <code>B905</code> diagnostic message (<a href="https://redirect.github.com/astral-sh/ruff/pull/13656">#13656</a>)</li> <li>[<code>flake8-todos</code>] Only flag the word "TODO", not words starting with "todo" (<code>TD006</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13640">#13640</a>)</li> <li>[<code>pycodestyle</code>] Fix whitespace-related false positives and false negatives inside type-parameter lists (<code>E231</code>, <code>E251</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13704">#13704</a>)</li> <li>[<code>flake8-simplify</code>] Stabilize preview behavior for <code>SIM115</code> so that the rule can detect files being opened from a wider range of standard-library functions (<a href="https://redirect.github.com/astral-sh/ruff/pull/12959">#12959</a>).</li> </ul> <h3>CLI</h3> <ul> <li>Add explanation of fixable in <code>--statistics</code> command (<a href="https://redirect.github.com/astral-sh/ruff/pull/13774">#13774</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>pyflakes</code>] Allow <code>ipytest</code> cell magic (<code>F401</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13745">#13745</a>)</li> <li>[<code>flake8-use-pathlib</code>] Fix <code>PTH123</code> false positive when <code>open</code> is passed a file descriptor (<a href="https://redirect.github.com/astral-sh/ruff/pull/13616">#13616</a>)</li> <li>[<code>flake8-bandit</code>] Detect patterns from multi line SQL statements (<code>S608</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/13574">#13574</a>)</li> <li>[<code>flake8-pyi</code>] - Fix dropped expressions in <code>PYI030</code> autofix (<a href="https://redirect.github.com/astral-sh/ruff/pull/13727">#13727</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/5e6de4e0c69660e8ca8608d1ac965216197756ce"><code>5e6de4e</code></a> Changelog for Ruff v0.7 (<a href="https://redirect.github.com/astral-sh/ruff/issues/13794">#13794</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/70e5c4a8ba679e80554c02bce7435dde085eb5bf"><code>70e5c4a</code></a> Recode <code>TRY302</code> to <code>TRY203</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/13502">#13502</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/9218d6bedc1063c110a8205db144fedc4366a3ec"><code>9218d6b</code></a> Remove <code>allow-unused-imports</code> setting from the common lint options (<a href="https://redirect.github.com/astral-sh/ruff/issues/13677">#13677</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/1b79ae9817d2c5da6ac81b069c5dff71e1e771c8"><code>1b79ae9</code></a> [ruff-0.7] Stabilise the expansion of <code>open-file-with-context-handler</code> to wor...</li> <li><a href="https://github.com/astral-sh/ruff/commit/2b87587ac2b407c9dfb0d020339218e12321a898"><code>2b87587</code></a> [<code>flake8-pytest-style</code>] Fix defaults when <code>lint.flake8-pytest-style</code> config s...</li> <li><a href="https://github.com/astral-sh/ruff/commit/d1e15f6246265dab43bbfbc0f9c10c8a8e720347"><code>d1e15f6</code></a> Remove tab-size setting (<a href="https://redirect.github.com/astral-sh/ruff/issues/12835">#12835</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/89a82158a12fe903c0bcbbbeafc9e00b9f888539"><code>89a8215</code></a> Remove error messages for removed CLI aliases (<a href="https://redirect.github.com/astral-sh/ruff/issues/12833">#12833</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/202c6a6d753ba07aee27220eaece04b7f52b9d6a"><code>202c6a6</code></a> Remove <code>output-format=text</code> setting (<a href="https://redirect.github.com/astral-sh/ruff/issues/12836">#12836</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/5c3c0c4705dfba0ba777df384482464e29e7d86c"><code>5c3c0c4</code></a> [red-knot] Inference for comparison of union types (<a href="https://redirect.github.com/astral-sh/ruff/issues/13781">#13781</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/6b7a738825a5268590fbf4e9724930734d326f32"><code>6b7a738</code></a> Add explanation of fixable in <code>--statistics</code> command (<a href="https://redirect.github.com/astral-sh/ruff/issues/13774">#13774</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.6.9...0.7.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.6.9&new-version=0.7.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