You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the foundation for everything else and fixes several issues. It's been open for two weeks, so I will probably merge it in another week or so if there aren't comments
Activity
hauntsaninja commentedon Jan 11, 2026
The first PR is:
This is the foundation for everything else and fixes several issues. It's been open for two weeks, so I will probably merge it in another week or so if there aren't comments
hauntsaninja commentedon Jan 14, 2026
In case useful, for now I have several of my queued changes visible together on this branch: hauntsaninja#5
hauntsaninja commentedon Jan 16, 2026
The second PR is pure refactoring (as a follow up to #20492 ):
I also opened a third PR with some more test cases:
hauntsaninja commentedon Jan 16, 2026
Note the first PR does introduce three regressions that I haven't yet solved:
hasattr#20596hauntsaninja commentedon Jan 16, 2026
A fourth PR is better narrowing for NotImplemented:
hauntsaninja commentedon Jan 16, 2026
This next one is a useful one! Fifth PR is narrowing for collection containment:
hauntsaninja commentedon Jan 16, 2026
Contributor PRs to follow up on as stack is merged: #20603 (done) #20277 (open) #20538 (done)
hauntsaninja commentedon Jan 17, 2026
Sixth PR improves logic with enum subclasses:
hauntsaninja commentedon Jan 22, 2026
Add this test: #20602 (comment) (done in stack)
hauntsaninja commentedon Jan 22, 2026
Seventh PR:
hauntsaninja commentedon Jan 22, 2026
Eighth PR (exploratory for now, do not review):
hauntsaninja commentedon Jan 22, 2026
Ninth PR is trivial testing related changes:
hauntsaninja commentedon Jan 23, 2026
Tenth PR adds support for narrowing in
type(x) is type(y), which seems pretty common in primer:22 remaining items
hauntsaninja commentedon Feb 3, 2026
Thirty second PR improves logic within
conditional_typesfor unions:hauntsaninja commentedon Feb 5, 2026
Thirty third PR improves narrowing with final type objects:
hauntsaninja commentedon Feb 5, 2026
Thirty fourth improves match statement narrowing against unions:
hauntsaninja commentedon Feb 6, 2026
Thirtyfifth fixes an issue with custom equality:
hauntsaninja commentedon Feb 6, 2026
Thirtysixth is unsound but we see there are some primer hits now:
hauntsaninja commentedon Feb 8, 2026
Thirtyseventh avoids narrowing NewType:
hauntsaninja commentedon Feb 11, 2026
Thirtyeighth for irrefutable sequence patterns:
hauntsaninja commentedon Feb 23, 2026
Fortieth PR is better narrowing for callables with generic return types:
hauntsaninja commentedon Feb 23, 2026
Fortyfirst PR for better match narrowing for type objects:
hauntsaninja commentedon Feb 25, 2026
Fortysecond PR improves narrowing reachability for tuple as patterns:
Fixes more issues than I expected, guess people really like matching tuples
hauntsaninja commentedon Feb 26, 2026
Fortythird PR for match narrowing of unions of type objects:
hauntsaninja commentedon Feb 26, 2026
Fortyfourth PR for match narrowing of irrefutable map patterns:
hauntsaninja commentedon Mar 11, 2026
Time for changelog post: #21006
Update changelog for narrowing changes (python#21006)