Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jan 22, 2026

Rewrites this logic to fit in with the new narrowing I do. Cleans things up, makes things a little faster, and improves semantics on some not realistic edge cases for chained comparisons

@github-actions
Copy link
Contributor

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

@hauntsaninja
Copy link
Collaborator Author

I'm going to go ahead and merge this one, but please feel free to lmk if you have feedback

@hauntsaninja hauntsaninja merged commit 043977c into python:master Jan 22, 2026
23 checks passed
@hauntsaninja hauntsaninja deleted the narrow12 branch January 22, 2026 23:26
JukkaL pushed a commit that referenced this pull request Jan 23, 2026
I refactored the logic for type(x) narrowing in #20634 , but left this
piece out since it has material semantic impact

Fixes #11952
Fixes #20275
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