KEMBAR78
Update the overlapping check for tuples to account for NamedTuples by A5rocks · Pull Request #18564 · python/mypy · GitHub
Skip to content

Conversation

A5rocks
Copy link
Collaborator

@A5rocks A5rocks commented Jan 29, 2025

Fixes #18562.

Fixes #6623.

Fixes #18520. (Only incidentally and I'm not exactly sure why.)

I was investigating what input mypy thought satisfied both overloads and I found that mypy is missing a check on the fallback type.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

CPython (peg_generator) (https://github.com/python/cpython): 1.83x faster (25.4s -> 13.9s in a single noisy sample)

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@JukkaL JukkaL merged commit e2b821b into python:master Jan 30, 2025
18 checks passed
@A5rocks A5rocks deleted the fix-namedtuple-overlapping branch January 30, 2025 11:11
x612skm pushed a commit to x612skm/mypy-dev that referenced this pull request Feb 24, 2025
…ython#18564)

Fixes python#18562.

Fixes python#6623.

Fixes python#18520. (Only incidentally
and I'm not exactly sure why.)

I was investigating what input mypy thought satisfied both overloads and
I found that mypy is missing a check on the fallback type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants