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

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
@github-actions
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