Skip to content

Bump mypy from 2.3.1 to 2.4.0 - #141

Merged
docktermj merged 1 commit into
mainfrom
dependabot/pip/mypy-2.4.0
Oct 23, 2026
Merged

docktermj merged 1 commit into
mainfrom
dependabot/pip/mypy-2.4.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 23, 2026

Copy link
Copy Markdown
Contributor

Bumps mypy from 2.3.1 to 2.4.0.

Changelog

Sourced from mypy's changelog.

Mypy Release Notes

Next Release

Mypy 2.4

We've just uploaded mypy 2.4.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. 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.

Python 3.15 Support

Mypy 2.4 supports running on Python 3.15 and type checking most Python 3.15 features. This includes the new builtin sentinel type for sentinel values (PEP 661), which mypy now supports (see below for details). Lazy imports (PEP 810) and unpacking in comprehensions (PEP 798) are also supported. Closed TypedDicts (PEP 728) have been supported since mypy 2.2, but the extra_items TypedDict argument, also introduced in PEP 728, is still unsupported. Support for extra_items will be added in a future mypy release.

Native Parser Enabled by Default

Mypy now uses the new native parser by default. It's based on the Ruff parser, and it's significantly faster than the legacy parser, which uses the stdlib ast module. The native parser also has other benefits:

  • You can target newer Python versions and use recent Python syntax even when running mypy on an older Python version. For example, you can use --python-version 3.15 when running mypy on Python 3.14.
  • Stub files can use syntax that is newer than the target Python version. For example, stubs can use the PEP 695 generic class syntax (class Box[T]: ...) when running on or targeting Python 3.10.
  • Parallel type checking requires the native parser.

The legacy parser is still available through --no-native-parser, or native_parser = False in the config file (native_parser = false under [tool.mypy] in pyproject.toml). We are planning to remove the legacy parser in early 2027. If you run into a problem with the native parser, please report it on the issue tracker.

Unlike the legacy parser, the native parser doesn't support type comments for variables defined by for and with statements. These type comments are silently ignored, and the types of the variables are

... (truncated)

Commits

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

Bumps [mypy](https://github.com/python/mypy) from 2.3.1 to 2.4.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v2.3.1...v2.4.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 2.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested a review from a team as a code owner October 23, 2026 00:53
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown

🤖 Claude Code Review

PR Review: Bump mypy from 2.3.1 to 2.4.0

This PR changes one line in pyproject.toml:77. It bumps the pinned mypy in the lint dependency group. I only read the diff and did not run mypy or the lint job against 2.4.0.

Code Quality

  • ✅ Style: The pin format matches the neighboring entries (== exact pins).
  • ✅ No commented-out code: None added.
  • ✅ Variable names and DRY: Not applicable.
  • ✅ Defects: None seen. This is a dev-only lint dependency, so it doesn't affect the mapper's runtime behavior. A new mypy minor release can report new type errors, so CI should be green before merging.
  • ✅ .claude/CLAUDE.md: It has no local-environment-specific content. Its lint command mentions only pylint, not mypy. That is existing behavior and not a problem with this PR.

Testing

  • ✅ Unit and integration tests: None needed, since no source code changed.
  • ✅ Edge cases and coverage: Not affected.
  • ⚠️ CI: Confirm the lint workflow (Python 3.10–3.13) passes with mypy 2.4.0. mypy 2.x may have dropped support for older Python versions as a target. Check that 2.4.0 still installs on 3.10 and 3.11, because the lint group's other pins already vary by Python version.

Documentation

  • ✅ README and API docs: No update needed.
  • ⚠️ CHANGELOG.md: It isn't updated. This is usually acceptable for automated dependency bumps, but follow the repo's convention if it logs them.
  • ✅ Markdown formatting: No Markdown files changed.

Security

  • ✅ Credentials, input validation, error handling, logs: No issues.
  • ✅ License files: No .lic files or AQAAAD strings in the diff.

Summary

Low-risk dev-dependency bump. Approve once CI passes on all supported Python versions.

Automated code review analyzing defects and coding standards

@docktermj
docktermj merged commit 775c731 into main Oct 23, 2026
11 checks passed
@docktermj
docktermj deleted the dependabot/pip/mypy-2.4.0 branch October 23, 2026 13:25
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 python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant