Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Better match narrowing for irrefutable sequence patterns#20782

Merged
hauntsaninja merged 2 commits into
python:masterpython/mypy:masterfrom
hauntsaninja:narrow95hauntsaninja/mypy:narrow95Copy head branch name to clipboard
Feb 19, 2026
Merged

Better match narrowing for irrefutable sequence patterns#20782
hauntsaninja merged 2 commits into
python:masterpython/mypy:masterfrom
hauntsaninja:narrow95hauntsaninja/mypy:narrow95Copy head branch name to clipboard

Conversation

@hauntsaninja

@hauntsaninja hauntsaninja commented Feb 11, 2026

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 hauntsaninja mentioned this pull request Feb 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@hauntsaninja

Copy link
Copy Markdown
Collaborator Author

Will merge this one tomorrow

@hauntsaninja hauntsaninja merged commit 688121a into python:master Feb 19, 2026
23 checks passed
@hauntsaninja hauntsaninja deleted the narrow95 branch February 19, 2026 23:33
hauntsaninja added a commit that referenced this pull request Mar 4, 2026
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.