Content-Length: 270529 | pFad | http://github.com/python/mypy/pull/19149

8A Fix nondeterministic type checking by making join between TypeType and TypeVar commute by hauntsaninja · Pull Request #19149 · python/mypy · GitHub
Skip to content

Fix nondeterministic type checking by making join between TypeType and TypeVar commute #19149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #18125

Unhandled cases in default seem fairly dangerous

@hauntsaninja hauntsaninja changed the title Fix commutativity of join between TypeType and TypeVar Fix nondeterministic type checking by making join between TypeType and TypeVar commute May 26, 2025
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@A5rocks A5rocks left a comment

Choose a reason for hiding this comment

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

At some point I was trying to get some basic property testing setup which could eliminate this class of bugs, but it ended up too complicated :(

This makes sense though.

@JukkaL JukkaL merged commit 27d118b into python:master May 27, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type error randomly raised when using a decorator and a type: ignore comment
3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/mypy/pull/19149

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy