Skip to content

Conversation

@cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Dec 13, 2025

The rest attribute doesn't have any line or column information. Fall back to the MappingPattern info.
Closes #20259

@cdce8p cdce8p added topic-match-statement Python 3.10's match statement topic-error-reporting How we report errors labels Dec 13, 2025
@github-actions

This comment has been minimized.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Might make sense to have rest have an explicit type declaration in case we ever enable --allow-redefinition-new by default

@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 hauntsaninja merged commit 8de78b8 into python:master Dec 13, 2025
23 checks passed
@cdce8p cdce8p deleted the match-mapping-rest-loc branch December 13, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-error-reporting How we report errors topic-match-statement Python 3.10's match statement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error for incompatible capture type is missing line number

2 participants