Skip to content

Bump mypy from 1.20.2 to 2.0.0#12479

Open
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/mypy-2.0.0
Open

Bump mypy from 1.20.2 to 2.0.0#12479
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/mypy-2.0.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 7, 2026

Bumps mypy from 1.20.2 to 2.0.0.

Changelog

Sourced from mypy's changelog.

Mypy Release Notes

Next Release

Mypy 2.0

We’ve just uploaded mypy 2.0.0 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. There are also changes to options and defaults. You can install it as follows:

python3 -m pip install -U mypy

You can read the full documentation for this release on Read the Docs.

Enable --local-partial-types by Default

This flag affects the inference of types based on assignments in other scopes. For now, explicitly disabling this continues to be supported, but this support will be removed in the future as the legacy behaviour is hard to support with other current and future features in mypy, like the daemon or the new implementation of flexible redefinitions.

Contributed by Ivan Levkivskyi, Jukka Lehtosalo, Shantanu in PR 21163.

Enable --strict-bytes by Default

Per PEP 688, mypy no longer treats bytearray and memoryview values as assignable to the bytes type.

Contributed by Shantanu in PR 18371.

New Behavior for --allow-redefinition

The --allow-redefinition flag now behaves like --allow-redefinition-new in mypy 1.20 and earlier. The new behavior is generally more flexible. For example, you can have different types for a variable in different blocks:

# mypy: allow-redefinition
def foo(cond: bool) -> None:
if cond:
for x in ["a", "b"]:
# Type of "x" is "str" here
...
else:
for x in [1, 2]:
# Type of "x" is "int" here
...

... (truncated)

Commits

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label May 7, 2026
@dependabot dependabot Bot requested review from asvetlov and webknjaz as code owners May 7, 2026 10:40
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label May 7, 2026
@github-actions github-actions Bot enabled auto-merge (squash) May 7, 2026 10:41
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 7, 2026

Merging this PR will not alter performance

✅ 67 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing dependabot/pip/mypy-2.0.0 (dd42c30) with master (0c919f4)2

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on master (fa46503) during the generation of this report, so 0c919f4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.83%. Comparing base (0c919f4) to head (dd42c30).
⚠️ Report is 3 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12479      +/-   ##
==========================================
- Coverage   98.92%   98.83%   -0.10%     
==========================================
  Files         134      132       -2     
  Lines       46750    46706      -44     
  Branches     2429     2419      -10     
==========================================
- Hits        46248    46161      -87     
- Misses        373      415      +42     
- Partials      129      130       +1     
Flag Coverage Δ
CI-GHA 98.89% <ø> (-0.10%) ⬇️
OS-Linux 98.63% <ø> (-0.10%) ⬇️
OS-Windows 96.98% <ø> (ø)
OS-macOS 97.78% <ø> (-0.12%) ⬇️
Py-3.10.11 97.39% <ø> (-0.01%) ⬇️
Py-3.10.20 97.86% <ø> (+<0.01%) ⬆️
Py-3.11.15 98.11% <ø> (-0.01%) ⬇️
Py-3.11.9 97.65% <ø> (ø)
Py-3.12.10 97.74% <ø> (+<0.01%) ⬆️
Py-3.12.13 98.20% <ø> (ø)
Py-3.13.13 98.44% <ø> (-0.01%) ⬇️
Py-3.14.4 98.39% <ø> (-0.12%) ⬇️
Py-3.14.4t 97.51% <ø> (ø)
Py-pypy3.11.15-7.3.21 97.35% <ø> (-0.01%) ⬇️
VM-macos 97.78% <ø> (-0.12%) ⬇️
VM-ubuntu 98.63% <ø> (-0.10%) ⬇️
VM-windows 96.98% <ø> (ø)
cython-coverage 38.08% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dependabot dependabot Bot force-pushed the dependabot/pip/mypy-2.0.0 branch from 826b1be to edacafb Compare May 7, 2026 11:55
Bumps [mypy](https://github.com/python/mypy) from 1.20.2 to 2.0.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.20.2...v2.0.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/pip/mypy-2.0.0 branch from edacafb to dd42c30 Compare May 7, 2026 12:37
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants