FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Better match narrowing for irrefutable sequence patterns by hauntsaninja · Pull Request #20782 · python/mypy · GitHub

Repository navigation

Better match narrowing for irrefutable sequence patterns - #20782

Merged
hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:narrow95
Feb 19, 2026
Merged

hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:narrow95

Conversation

hauntsaninja commented Feb 11, 2026 •
edited
Loading

Copy link
Copy Markdown
Collaborator

The changes around narrow_sequence_child:

Fixes #13955
Helps with things in #19081

The changes around narrow_sequence_child:
- implement my suggestion from here:
  python#18091 (review)
- remove an is_subtype check I don't understand
hauntsaninja mentioned this pull request Feb 11, 2026

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Collaborator Author

Will merge this one tomorrow

hauntsaninja merged commit 688121a into python:master Feb 19, 2026
23 checks passed
hauntsaninja deleted the narrow95 branch February 19, 2026 23:33
hauntsaninja added a commit that referenced this pull request Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

No narrowing of sequence types after a sequence pattern case in a match statement

2 participants


Back | FazBrowse Home | New Git URL