Skip to content
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

Enhanced type narrowing logic for "x == <literal>" type guard pattern… #9318

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

erictraut
Copy link
Collaborator

… to handle the case where x is a type variable with a literal upper bound or value constraints that are literals. This addresses #9300.

… to handle the case where `x` is a type variable with a literal upper bound or value constraints that are literals. This addresses #9300.
Copy link
Contributor

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

@erictraut erictraut merged commit e7f0d36 into main Oct 24, 2024
18 checks passed
@erictraut erictraut deleted the issue-9300 branch October 24, 2024 18:32
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.

1 participant