Skip to content

Commit

Permalink
Bump ruff from 0.3.5 to 0.4.2 (#6110)
Browse files Browse the repository at this point in the history
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.5 to 0.4.2.
<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>v0.4.2</h2>
<h2>Changes</h2>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-pyi</code>] Allow for overloaded <code>__exit__</code>
and <code>__aexit__</code> definitions (<code>PYI036</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11057">#11057</a>)</li>
<li>[<code>pyupgrade</code>] Catch usages of <code>&quot;%s&quot; %
var</code> and provide an unsafe fix (<code>UP031</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11019">#11019</a>)</li>
<li>[<code>refurb</code>] Implement new rule that suggests min/max over
<code>sorted()</code> (<code>FURB192</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10868">#10868</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Fix an issue with missing diagnostics for Neovim and Helix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11092">#11092</a>)</li>
<li>Implement hover documentation for <code>noqa</code> codes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11096">#11096</a>)</li>
<li>Introduce common Ruff configuration options with new server settings
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/11062">#11062</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Use <code>macos-12</code> for building release wheels to enable
macOS 11 compatibility (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11146">#11146</a>)</li>
<li>[<code>flake8-blind-expect</code>] Allow raise from in
<code>BLE001</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11131">#11131</a>)</li>
<li>[<code>flake8-pyi</code>] Allow simple assignments to
<code>None</code> in enum class scopes (<code>PYI026</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11128">#11128</a>)</li>
<li>[<code>flake8-simplify</code>] Avoid raising <code>SIM911</code> for
non-<code>zip</code> attribute calls (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11126">#11126</a>)</li>
<li>[<code>refurb</code>] Avoid <code>operator.itemgetter</code>
suggestion for single-item tuple (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11095">#11095</a>)</li>
<li>[<code>ruff</code>] Respect per-file-ignores for <code>RUF100</code>
with no other diagnostics (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11058">#11058</a>)</li>
<li>[<code>ruff</code>] Fix async comprehension false positive
(<code>RUF029</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11070">#11070</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Document explicitly disabling strict
zip (<code>B905</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11040">#11040</a>)</li>
<li>[<code>flake8-type-checking</code>] Mention
<code>lint.typing-modules</code> in <code>TCH001</code>,
<code>TCH002</code>, and <code>TCH003</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11144">#11144</a>)</li>
<li>[<code>isort</code>] Improve documentation around custom
<code>isort</code> sections (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11050">#11050</a>)</li>
<li>[<code>pylint</code>] Fix documentation oversight for
<code>invalid-X-returns</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11094">#11094</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Use <code>matchit</code> to resolve per-file settings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11111">#11111</a>)</li>
</ul>
<h2>Contributors</h2>
<ul>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/JonathanPlasse"><code>@​JonathanPlasse</code></a></li>
<li><a href="https://github.com/KPCOFGS"><code>@​KPCOFGS</code></a></li>
<li><a
href="https://github.com/KotlinIsland"><code>@​KotlinIsland</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/augustelalande"><code>@​augustelalande</code></a></li>
<li><a
href="https://github.com/autinerd"><code>@​autinerd</code></a></li>
<li><a
href="https://github.com/bersbersbers"><code>@​bersbersbers</code></a></li>
<li><a href="https://github.com/carljm"><code>@​carljm</code></a></li>
<li><a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li>
<li><a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a></li>
<li><a
href="https://github.com/ibraheemdev"><code>@​ibraheemdev</code></a></li>
<li><a
href="https://github.com/jfrost-mo"><code>@​jfrost-mo</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.4.2</h2>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-pyi</code>] Allow for overloaded <code>__exit__</code>
and <code>__aexit__</code> definitions (<code>PYI036</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11057">#11057</a>)</li>
<li>[<code>pyupgrade</code>] Catch usages of <code>&quot;%s&quot; %
var</code> and provide an unsafe fix (<code>UP031</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11019">#11019</a>)</li>
<li>[<code>refurb</code>] Implement new rule that suggests min/max over
<code>sorted()</code> (<code>FURB192</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10868">#10868</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Fix an issue with missing diagnostics for Neovim and Helix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11092">#11092</a>)</li>
<li>Implement hover documentation for <code>noqa</code> codes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11096">#11096</a>)</li>
<li>Introduce common Ruff configuration options with new server settings
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/11062">#11062</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Use <code>macos-12</code> for building release wheels to enable
macOS 11 compatibility (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11146">#11146</a>)</li>
<li>[<code>flake8-blind-expect</code>] Allow raise from in
<code>BLE001</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11131">#11131</a>)</li>
<li>[<code>flake8-pyi</code>] Allow simple assignments to
<code>None</code> in enum class scopes (<code>PYI026</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11128">#11128</a>)</li>
<li>[<code>flake8-simplify</code>] Avoid raising <code>SIM911</code> for
non-<code>zip</code> attribute calls (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11126">#11126</a>)</li>
<li>[<code>refurb</code>] Avoid <code>operator.itemgetter</code>
suggestion for single-item tuple (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11095">#11095</a>)</li>
<li>[<code>ruff</code>] Respect per-file-ignores for <code>RUF100</code>
with no other diagnostics (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11058">#11058</a>)</li>
<li>[<code>ruff</code>] Fix async comprehension false positive
(<code>RUF029</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11070">#11070</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Document explicitly disabling strict
zip (<code>B905</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11040">#11040</a>)</li>
<li>[<code>flake8-type-checking</code>] Mention
<code>lint.typing-modules</code> in <code>TCH001</code>,
<code>TCH002</code>, and <code>TCH003</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11144">#11144</a>)</li>
<li>[<code>isort</code>] Improve documentation around custom
<code>isort</code> sections (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11050">#11050</a>)</li>
<li>[<code>pylint</code>] Fix documentation oversight for
<code>invalid-X-returns</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11094">#11094</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Use <code>matchit</code> to resolve per-file settings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11111">#11111</a>)</li>
</ul>
<h2>0.4.1</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>pylint</code>] Implement <code>invalid-hash-returned</code>
(<code>PLE0309</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10961">#10961</a>)</li>
<li>[<code>pylint</code>] Implement <code>invalid-index-returned</code>
(<code>PLE0305</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10962">#10962</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>pylint</code>] Allow <code>NoReturn</code>-like functions for
<code>__str__</code>, <code>__len__</code>, etc. (<code>PLE0307</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/11017">#11017</a>)</li>
<li>Parser: Use empty range when there's &quot;gap&quot; in token source
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/11032">#11032</a>)</li>
<li>[<code>ruff</code>] Ignore stub functions in
<code>unused-async</code> (<code>RUF029</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11026">#11026</a>)</li>
<li>Parser: Expect indented case block instead of match stmt (<a
href="https://redirect.github.com/astral-sh/ruff/pull/11033">#11033</a>)</li>
</ul>
<h2>0.4.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/77c93fd63c1c072501d297082aa59c741b2d5466"><code>77c93fd</code></a>
Bump version to 0.4.2 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11151">#11151</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1c9f5e3001da83a7e48aef21ef72d155c8928035"><code>1c9f5e3</code></a>
Display the AST even with syntax errors (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11147">#11147</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/263a0d25edf0e56358a6132158d96f06bf94701b"><code>263a0d2</code></a>
Use <code>macos-12</code> to build release wheels (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11146">#11146</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4738e199747cdfb7dd82d45b3bd23b715ad0d526"><code>4738e19</code></a>
Remove unused lexical error types (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11145">#11145</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f428bd5052b9729cb25be4dd74c703308695edab"><code>f428bd5</code></a>
Docs: mention <code>lint.typing-modules</code> in <code>TCH001</code>,
<code>TCH002</code>, <code>TCH003</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11144">#11144</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4690890e9fc880489007ea557a0c7fcb190d9c73"><code>4690890</code></a>
<code>ruff server</code>: In 'publish diagnostics' mode, document
diagnostics are cleare...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/19baabba58c55d8c280b701dc5fb346ce19477bd"><code>19baabb</code></a>
README: add Apache Superset to project list (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11136">#11136</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/cee38f39dfb7eaca22eda3c19a4d81adc4097105"><code>cee38f3</code></a>
[<code>flake8-blind-expect</code>] Allow raise from in
<code>BLE001</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11131">#11131</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e3fde2814655dd315683833c772d10e6cd55ba08"><code>e3fde28</code></a>
[<code>flake8-pyi</code>] Allow overloaded <code>__exit__</code> and
<code>__aexit__</code> definitions (`PYI0...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1c8849f9a8a2e2dcc0849f35fd5c39049a1e4a6e"><code>1c8849f</code></a>
Use Matchit to Resolve Per-File Settings (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11111">#11111</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.3.5...v0.4.2">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.3.5&new-version=0.4.2)](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>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and justinchuby committed May 1, 2024
1 parent c5fad7b commit a86c20c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion onnx/test/reference_evaluator_test.py
Expand Up @@ -295,7 +295,7 @@ def f(x, a, b): # noqa: ARG001
onnx_model = make_model(graph, opset_imports=[make_opsetid("", opset)])
try:
check_model(onnx_model)
except Exception as e: # noqa: BLE001
except Exception as e:
raise AssertionError(f"checker fails for\n{onnx_model}") from e
return onnx_model, f

Expand Down
2 changes: 1 addition & 1 deletion onnx/test/test_backend_onnxruntime.py
Expand Up @@ -69,7 +69,7 @@ def _create_inference_session(model: onnx.ModelProto, device: str):
raise ValueError(f"Unexpected device {device!r}.")
try:
session = ort.InferenceSession(model.SerializeToString(), providers=providers)
except Exception as e: # noqa: BLE001
except Exception as e:
raise RuntimeError(
f"Unable to create inference session. Model is:\n\n{onnx.printer.to_text(model)}"
) from e
Expand Down
2 changes: 1 addition & 1 deletion requirements-lintrunner.txt
@@ -1,7 +1,7 @@
# This file is auto updated by dependabot
lintrunner-adapters>=0.12.3
# RUFF
ruff==0.3.5
ruff==0.4.2
# MYPY
mypy==1.10.0
types-protobuf==4.24.0.20240129
Expand Down

0 comments on commit a86c20c

Please sign in to comment.