Skip to content

Bump mypy from 0.812 to 1.14.1 in /django#1250

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

Bump mypy from 0.812 to 1.14.1 in /django#1250
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/django/mypy-1.14.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 19, 2026

Bumps mypy from 0.812 to 1.14.1.

Changelog

Sourced from mypy's changelog.

Mypy Release Notes

Next Release

Better narrowing

Mypy's implementation of narrowing has been substantially reworked. Mypy will now narrow more aggressively, more consistently, and more correctly. In particular, you are likely to notice new narrowing behavior in equality expressions (==), containment expressions (in), match statements, and additional expressions providing type guards.

Note that mypy (and other Python type checkers) do not model the potential for various non-local operations to invalidate narrowing assumptions. This means mypy may conclude that some of your code is unreachable and avoid further checking of it. The --warn-unreachable flag is useful for highlighting these cases. To reset narrowing, you can insert dummy reassignments, for instance var = var will reset all narrowing of var.attr.

Future work includes better narrowing on initial assignments, more narrowing to Literal types, and better checking of unreachable code.

Contributed by Shantanu Jain.

  • Rework narrowing logic for equality and identity (Shantanu, PR 20492)
  • Refactor equality and identity narrowing for clarity (Shantanu, PR 20595)
  • Treat NotImplemented as a singleton type (Shantanu, PR 20601)
  • Improve narrowing logic for Enum int and str subclasses (Shantanu, PR 20609)
  • Narrow types based on collection containment (Shantanu, PR 20602)
  • Refactor and improve narrowing for type(x) == t checks (Shantanu, PR 20634)
  • Narrow for type expr comparisons to type exprs (Shantanu, PR 20639)
  • Narrowing for comparisons against x.__class__ (Shantanu, PR 20642)
  • Better narrowing with custom equality (Shantanu, PR 20643)
  • Use a single pass for core narrowing logic, add comments (Shantanu, PR 20659)
  • Narrowing for final type objects (Shantanu, PR 20661)
  • Avoid narrowing type[T] (Shantanu, PR 20662)
  • Avoid widening to Any for checks like type(x) is type(y: Any) (Shantanu, PR 20663)
  • Preserve some lost narrowing, cleanup (Shantanu, PR 20674)
  • Fix narrowing related code for types with overloaded __new__ (Shantanu, PR 20676)
  • Fix isinstance with unions of tuples (Shantanu, PR 20677)
  • Fix regression to chained containment (Shantanu, PR 20688)
  • Improve else handling with custom equality (Shantanu, PR 20692)
  • Better model runtime in isinstance and type checks (Shantanu, PR 20675)
  • Use --warn-unreachable and --strict-equality in more tests (Shantanu, PR 20707)
  • Model exact narrowing with type(x) checks (Shantanu, PR 20703)
  • Short term fix for bytes narrowing (Shantanu, PR 20704)
  • Preserve narrowing in unreachable code (Shantanu, PR 20710)
  • Fix bug when narrowing union containing custom eq against custom eq (Shantanu, PR 20754)
  • Fix narrowing for unions (Shantanu, PR 20728)
  • Unsoundly narrow away from None with custom eq (Shantanu, PR 20756)
  • Improve narrowing with numeric types (Shantanu, PR 20727)

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

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Mar 19, 2026
Bumps [mypy](https://github.com/python/mypy) from 0.812 to 1.14.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v0.812...v1.14.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 1.14.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/django/mypy-1.14.1 branch from 68a03c8 to f1daa4c Compare March 26, 2026 12:45
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.

0 participants