Skip to content

Correctly handle empty tuple index when unpacked#21545

Merged
ilevkivskyi merged 1 commit into
python:masterfrom
ilevkivskyi:fix-unpack-empty-arg
May 27, 2026
Merged

Correctly handle empty tuple index when unpacked#21545
ilevkivskyi merged 1 commit into
python:masterfrom
ilevkivskyi:fix-unpack-empty-arg

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #18390
Closes #18395

This is a more targeted fix than the original PR. Note we don't need to worry about other places with flatten_nested_tuples(), since the issue is only specific to (early) UnboundType.

@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. ✅

@ilevkivskyi ilevkivskyi merged commit 668733d into python:master May 27, 2026
25 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-unpack-empty-arg branch May 27, 2026 00:00
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.

mypy doesn't know about empty unpacked tuples

1 participant