Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Bump ruff from 0.0.275 to 0.0.276 in /python #1829

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 3, 2023

Bumps ruff from 0.0.275 to 0.0.276.

Release notes

Sourced from ruff's releases.

v0.0.276

See the release blog post for more, including detailed descriptions of any newly added rules.

What's Changed

Highlights include: experimental support for linting Jupyter Notebooks.

To opt-in to linting Jupyter Notebook files, add the *.ipynb pattern to your include setting, like so:

[tool.ruff]
# Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]

This will prompt Ruff to discover Jupyter Notebook files in any specified directories, and lint them accordingly.

Jupyter Notebook support is currently opt-in and experimental. We'd love your help testing it out. Have feedback? Run into issues? Let us know!

New Rules

Jupyter

Settings

Bug Fixes

... (truncated)

Changelog

Sourced from ruff's changelog.

0.0.276

The keep-runtime-typing setting has been reinstated (#5470)

The keep-runtime-typing setting has been reinstated with revised semantics. This setting was removed in #4427, as it was equivalent to ignoring the UP006 and UP007 rules via Ruff's standard ignore mechanism.

Taking UP006 (rewrite List[int] to list[int]) as an example, the setting now behaves as follows:

  • On Python 3.7 and Python 3.8, setting keep-runtime-typing = true will cause Ruff to ignore UP006 violations, even if from __future__ import annotations is present in the file. While such annotations are valid in Python 3.7 and Python 3.8 when combined with from __future__ import annotations, they aren't supported by libraries like Pydantic and FastAPI, which rely on runtime type checking.
  • On Python 3.9 and above, the setting has no effect, as list[int] is a valid type annotation, and libraries like Pydantic and FastAPI support it without issue.

In short: keep-runtime-typing can be used to ensure that Ruff doesn't introduce type annotations that are not supported at runtime by the current Python version, which are unsupported by libraries like Pydantic and FastAPI.

Note that this is not a breaking change, but is included here to complement the previous removal of keep-runtime-typing.

0.0.268

The keep-runtime-typing setting has been removed (#4427)

Enabling the keep-runtime-typing option, located under the pyupgrade section, is equivalent to ignoring the UP006 and UP007 rules via Ruff's standard ignore mechanism. As there's no need for a dedicated setting to disable these rules, the keep-runtime-typing option has been removed.

0.0.267

update-check is no longer a valid configuration option (#4313)

The update-check functionality was deprecated in #2530, in that the behavior itself was removed, and Ruff was changed to warn when that option was enabled.

Now, Ruff will throw an error when update-check is provided via a configuration file (e.g., update-check = false) or through the command-line, since it has no effect. Users should remove this option from their configuration.

0.0.265

--fix-only now exits with a zero exit code, unless --exit-non-zero-on-fix is specified (#4146)

... (truncated)

Commits
  • 3992c47 Bump version to 0.0.276 (#5488)
  • 8de5a3d Allow Final assignments in stubs (#5490)
  • ed1dd09 Refine some perflint rules (#5484)
  • ca497fa Remove some diagnostics.extend calls (#5483)
  • 00fbbe4 Remove some additional manual iterator matches (#5482)
  • dadad0e Remove some allocations in argument detection (#5481)
  • d2450c2 Audit remove_argument usages to use end-of-function (#5480)
  • 1e4b889 Fix unnecessary-encode-utf8 to fix encode on parenthesized strings correc...
  • dc07253 Fix python_formatter generate.py with rust path (#5475)
  • 7ac9e02 Document Checking formatter stability and panics (#5415)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 commands and options

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 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)

@dependabot dependabot bot requested a review from a team as a code owner July 3, 2023 22:25
@dependabot dependabot bot added dependencies Pull requests that update a dependency file. Used by Dependabot. python Pull requests for the Python Semantic Kernel labels Jul 3, 2023
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.275 to 0.0.276.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.275...v0.0.276)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@shawncal shawncal force-pushed the dependabot/pip/python/ruff-0.0.276 branch from c038270 to 3311e5c Compare July 3, 2023 22:34
@shawncal shawncal added python Pull requests for the Python Semantic Kernel and removed python Pull requests for the Python Semantic Kernel labels Jul 3, 2023
@github-actions github-actions bot changed the title Bump ruff from 0.0.275 to 0.0.276 in /python Python: Bump ruff from 0.0.275 to 0.0.276 in /python Jul 3, 2023
@shawncal shawncal added this pull request to the merge queue Jul 3, 2023
Merged via the queue into main with commit 5eea92e Jul 3, 2023
21 checks passed
@shawncal shawncal deleted the dependabot/pip/python/ruff-0.0.276 branch July 3, 2023 22:43
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.275 to 0.0.276.
<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.0.276</h2>
<!-- raw HTML omitted -->
<p>See the <a href="https://astral.sh/blog/ruff-v0.0.276">release blog
post</a> for more, including detailed descriptions of any newly added
rules.</p>
<h2>What's Changed</h2>
<p>Highlights include: experimental support for linting Jupyter
Notebooks.</p>
<p>To opt-in to linting Jupyter Notebook files, add the
<code>*.ipynb</code> pattern to your <a
href="https://github.com/astral-sh/ruff/blob/HEAD/settings.md#include"><code>include</code></a>
setting, like so:</p>
<pre lang="toml"><code>[tool.ruff]
# Allow Ruff to discover `*.ipynb` files.
include = [&quot;*.py&quot;, &quot;*.pyi&quot;,
&quot;**/pyproject.toml&quot;, &quot;*.ipynb&quot;]
</code></pre>
<p>This will prompt Ruff to discover Jupyter Notebook files in any
specified directories, and lint them
accordingly.</p>
<p>Jupyter Notebook support is currently opt-in and experimental. We'd
love your help testing it out.
Have feedback? Run into issues? <a
href="https://github.com/astral-sh/ruff/issues/new">Let us know!</a></p>
<h3>New Rules</h3>
<ul>
<li>[<code>flake8-pyi</code>] Implement <code>PYI002</code>,
<code>PYI003</code>, <code>PYI004</code>, <code>PYI005</code> by <a
href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5457">astral-sh/ruff#5457</a></li>
<li>[<code>numpy</code>] Implement
<code>numpy-deprecated-function</code> (<code>NPY003</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5468">astral-sh/ruff#5468</a></li>
<li>[<code>perflint</code>] Implement <code>unnecessary-list-cast</code>
(<code>PERF101</code>) by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5121">astral-sh/ruff#5121</a></li>
<li>[<code>perflint</code>] Implement <code>try-except-in-loop</code>
(<code>PERF203</code>) by <a
href="https://github.com/evanrittenhouse"><code>@​evanrittenhouse</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5166">astral-sh/ruff#5166</a></li>
<li>[<code>perflint</code>] Implement
<code>manual-list-comprehension</code> (<code>PERF401</code>) and
<code>manual-list-copy</code> (<code>PERF402</code>) rules by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5298">astral-sh/ruff#5298</a></li>
<li>[<code>pylint</code>] Implement Pylint
<code>single-string-used-for-slots</code> (<code>C0205</code>) as
<code>single-string-slots</code> (<code>PLC0205</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5399">astral-sh/ruff#5399</a></li>
</ul>
<h3>Jupyter</h3>
<ul>
<li>Experimental release for Jupyter notebook integration by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5363">astral-sh/ruff#5363</a></li>
<li>Enable --watch for Jupyter notebooks by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5394">astral-sh/ruff#5394</a></li>
<li>Consider Jupyter index for code frames (<code>--show-source</code>)
by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5402">astral-sh/ruff#5402</a></li>
<li>fixup! Consider Jupyter index for code frames
(<code>--show-source</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5402">#5402</a>)
by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5414">astral-sh/ruff#5414</a></li>
</ul>
<h3>Settings</h3>
<ul>
<li>[<code>pyupgrade</code>] Restore the
<code>keep-runtime-typing</code> setting by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5470">astral-sh/ruff#5470</a></li>
<li>Add <code>PythonVersion::Py312</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5316">astral-sh/ruff#5316</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Support <code>pydantic.BaseSettings</code> in
<code>mutable-class-default</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5312">astral-sh/ruff#5312</a></li>
<li>Allow <code>__slots__</code> assignments in
<code>mutable-class-default</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5314">astral-sh/ruff#5314</a></li>
<li>Avoid syntax errors when removing f-string prefixes by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5319">astral-sh/ruff#5319</a></li>
<li>Ignore unpacking in <code>iteration-over-set</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5392">astral-sh/ruff#5392</a></li>
<li>Replace same length equal line with dash line in D407 by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5383">astral-sh/ruff#5383</a></li>
<li>Exclude docstrings from PYI053 by <a
href="https://github.com/intgr"><code>@​intgr</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5405">astral-sh/ruff#5405</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/BREAKING_CHANGES.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.0.276</h2>
<h3>The <code>keep-runtime-typing</code> setting has been reinstated (<a
href="https://redirect.github.com/astral-sh/ruff/pull/5470">#5470</a>)</h3>
<p>The <code>keep-runtime-typing</code> setting has been reinstated with
revised semantics. This setting was
removed in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4427">#4427</a>,
as it was equivalent to ignoring
the <code>UP006</code> and <code>UP007</code> rules via Ruff's standard
<code>ignore</code> mechanism.</p>
<p>Taking <code>UP006</code> (rewrite <code>List[int]</code> to
<code>list[int]</code>) as an example, the setting now behaves as
follows:</p>
<ul>
<li>On Python 3.7 and Python 3.8, setting <code>keep-runtime-typing =
true</code> will cause Ruff to ignore
<code>UP006</code> violations, even if <code>from __future__ import
annotations</code> is present in the file.
While such annotations are valid in Python 3.7 and Python 3.8 when
combined with
<code>from __future__ import annotations</code>, they aren't supported
by libraries like Pydantic and
FastAPI, which rely on runtime type checking.</li>
<li>On Python 3.9 and above, the setting has no effect, as
<code>list[int]</code> is a valid type annotation,
and libraries like Pydantic and FastAPI support it without issue.</li>
</ul>
<p>In short: <code>keep-runtime-typing</code> can be used to ensure that
Ruff doesn't introduce type annotations
that are not supported at runtime by the current Python version, which
are unsupported by libraries
like Pydantic and FastAPI.</p>
<p>Note that this is not a breaking change, but is included here to
complement the previous removal
of <code>keep-runtime-typing</code>.</p>
<h2>0.0.268</h2>
<h3>The <code>keep-runtime-typing</code> setting has been removed (<a
href="https://redirect.github.com/astral-sh/ruff/pull/4427">#4427</a>)</h3>
<p>Enabling the <code>keep-runtime-typing</code> option, located under
the <code>pyupgrade</code> section, is equivalent
to ignoring the <code>UP006</code> and <code>UP007</code> rules via
Ruff's standard <code>ignore</code> mechanism. As there's no
need for a dedicated setting to disable these rules, the
<code>keep-runtime-typing</code> option has been
removed.</p>
<h2>0.0.267</h2>
<h3><code>update-check</code> is no longer a valid configuration option
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/4313">#4313</a>)</h3>
<p>The <code>update-check</code> functionality was deprecated in <a
href="https://redirect.github.com/astral-sh/ruff/pull/2530">#2530</a>,
in that the behavior itself was removed, and Ruff was changed to warn
when that option was enabled.</p>
<p>Now, Ruff will throw an error when <code>update-check</code> is
provided via a configuration file (e.g.,
<code>update-check = false</code>) or through the command-line, since it
has no effect. Users should remove
this option from their configuration.</p>
<h2>0.0.265</h2>
<h3><code>--fix-only</code> now exits with a zero exit code, unless
<code>--exit-non-zero-on-fix</code> is specified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/4146">#4146</a>)</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/3992c47c008df8f706e03a6ba0d7aa7f068ef0a9"><code>3992c47</code></a>
Bump version to 0.0.276 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5488">#5488</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/8de5a3d29df5964dd91f39d0150caccc7bf0ab83"><code>8de5a3d</code></a>
Allow <code>Final</code> assignments in stubs (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5490">#5490</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ed1dd09d02af7972df301dac0c6b5d084f26cc1b"><code>ed1dd09</code></a>
Refine some <code>perflint</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5484">#5484</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ca497fabbd970a557ed1b45acccaa714e12573af"><code>ca497fa</code></a>
Remove some <code>diagnostics.extend</code> calls (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5483">#5483</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/00fbbe4223d0cbfc3014403ace659f48368e1852"><code>00fbbe4</code></a>
Remove some additional manual iterator matches (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5482">#5482</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/dadad0e9ed861b50c87f2bf5c4520b949ac177ab"><code>dadad0e</code></a>
Remove some allocations in argument detection (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5481">#5481</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d2450c25abc428cb5276933b2ae21017fcd98f3d"><code>d2450c2</code></a>
Audit <code>remove_argument</code> usages to use end-of-function (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5480">#5480</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1e4b88969cbfa866c0ac6aace562699c1fd6b371"><code>1e4b889</code></a>
Fix <code>unnecessary-encode-utf8</code> to fix <code>encode</code> on
parenthesized strings correc...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/dc072537e513912eced43c24e6fc8d61d77aca4d"><code>dc07253</code></a>
Fix python_formatter generate.py with rust path (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5475">#5475</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7ac9e0252e3c278078e19a7053671fdc845986af"><code>7ac9e02</code></a>
Document Checking formatter stability and panics (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5415">#5415</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.275...v0.0.276">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.0.275&new-version=0.0.276)](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 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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file. Used by Dependabot. python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant