Skip to content

Commit

Permalink
Bump mypy from 1.9.0 to 1.10.0 (#6112)
Browse files Browse the repository at this point in the history
Bumps [mypy](https://github.com/python/mypy) from 1.9.0 to 1.10.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/python/mypy/blob/master/CHANGELOG.md">mypy's
changelog</a>.</em></p>
<blockquote>
<h1>Mypy Release Notes</h1>
<h2>Next release</h2>
<h2>Mypy 1.10</h2>
<p>We’ve just uploaded mypy 1.10 to the Python Package Index (<a
href="https://pypi.org/project/mypy/">PyPI</a>). Mypy is a static type
checker for Python. This release includes new features, performance
improvements and bug fixes. You can install it as follows:</p>
<pre><code>python3 -m pip install -U mypy
</code></pre>
<p>You can read the full documentation for this release on <a
href="http://mypy.readthedocs.io">Read the Docs</a>.</p>
<h4>Support TypeIs (PEP 742)</h4>
<p>Mypy now supports <code>TypeIs</code> (<a
href="https://peps.python.org/pep-0742/">PEP 742</a>), which allows
functions to narrow the type of a value, similar to
<code>isinstance()</code>. Unlike <code>TypeGuard</code>,
<code>TypeIs</code> can narrow in both the <code>if</code> and
<code>else</code> branches of an if statement:</p>
<pre lang="python"><code>from typing_extensions import TypeIs
<p>def is_str(s: object) -&gt; TypeIs[str]:
return isinstance(s, str)</p>
<p>def f(o: str | int) -&gt; None:
if is_str(o):
# Type of o is 'str'
...
else:
# Type of o is 'int'
...
</code></pre></p>
<p><code>TypeIs</code> will be added to the <code>typing</code> module
in Python 3.13, but it
can be used on earlier Python versions by importing it from
<code>typing_extensions</code>.</p>
<p>This feature was contributed by Jelle Zijlstra (PR <a
href="https://redirect.github.com/python/mypy/pull/16898">16898</a>).</p>
<h4>Support TypeVar Defaults (PEP 696)</h4>
<p><a href="https://peps.python.org/pep-0696/">PEP 696</a> adds support
for type parameter defaults.
Example:</p>
<pre lang="python"><code>from typing import Generic
from typing_extensions import TypeVar
<p>&lt;/tr&gt;&lt;/table&gt;
</code></pre></p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python/mypy/commit/3faf0fc4798ec3ee6b1cd123965193dc0a753fb0"><code>3faf0fc</code></a>
Remove +dev for version for release 1.10</li>
<li><a
href="https://github.com/python/mypy/commit/a5998d20402515f0c0bf05c7fe1029e93aa9bfa8"><code>a5998d2</code></a>
Update CHANGELOG.md (<a
href="https://redirect.github.com/python/mypy/issues/17159">#17159</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/62ea5b01f0c0c99e7db93326cb8d219eecfb3cb6"><code>62ea5b0</code></a>
Various updates to changelog for 1.10 (<a
href="https://redirect.github.com/python/mypy/issues/17158">#17158</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/2f0864c4e55a74700d8ce2d97ab2d3ca2b288513"><code>2f0864c</code></a>
Update CHANGELOG.md with draft for release 1.10 (<a
href="https://redirect.github.com/python/mypy/issues/17150">#17150</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/e1443bbade91118794055449cc8b4b4f7fd08b7d"><code>e1443bb</code></a>
fix: incorrect returned type of access descriptors on unions of types
(<a
href="https://redirect.github.com/python/mypy/issues/16604">#16604</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/5161ac2e5b73dc7597536eb4444219868317e5d9"><code>5161ac2</code></a>
Sync typeshed (<a
href="https://redirect.github.com/python/mypy/issues/17124">#17124</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/e2fc1f28935806ca04b18fab277217f583b51594"><code>e2fc1f2</code></a>
Fix crash when expanding invalid Unpack in a <code>Callable</code> alias
(<a
href="https://redirect.github.com/python/mypy/issues/17028">#17028</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/3ff6e47c57a67e807e0b4579a816b4f66ab16824"><code>3ff6e47</code></a>
Docs: docstrings in checker.py, ast_helpers.py (<a
href="https://redirect.github.com/python/mypy/issues/16908">#16908</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/732d98ecb2a98e4eaea14aba1ed8ac9c1f5ccdb6"><code>732d98e</code></a>
Fix string formatting for string enums (<a
href="https://redirect.github.com/python/mypy/issues/16555">#16555</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/80190101f68b52e960c22572ed6cc814de078b9c"><code>8019010</code></a>
Narrow individual items when matching a tuple to a sequence pattern (<a
href="https://redirect.github.com/python/mypy/issues/16905">#16905</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/python/mypy/compare/1.9.0...v1.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mypy&package-manager=pip&previous-version=1.9.0&new-version=1.10.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] committed May 1, 2024
1 parent 41e3002 commit 273aca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion requirements-lintrunner.txt
Expand Up @@ -3,7 +3,7 @@ lintrunner-adapters>=0.12.3
# RUFF
ruff==0.3.5
# MYPY
mypy==1.9.0
mypy==1.10.0
types-protobuf==4.24.0.20240129
# BLACK-ISORT
black==24.3.0
Expand Down

0 comments on commit 273aca3

Please sign in to comment.