Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix overlap check for variadic generics - #18638

Merged
ilevkivskyi merged 1 commit into
python:masterfrom
ilevkivskyi:fix-instance-overlap
Feb 9, 2025
Merged

Fix overlap check for variadic generics#18638
ilevkivskyi merged 1 commit into
python:masterfrom
ilevkivskyi:fix-instance-overlap

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #18105

When I implemented this initially, I only handled tuples, but forgot instances, thus causing the crash. I don't add many tests, since the instance overlap check simply relays to the tuple one, that is already tested.

(Btw I already forgot how verbose everything is in the TypeVarTuple world :-))

@github-actions

github-actions Bot commented Feb 8, 2025

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 29ffa3e into python:master Feb 9, 2025
@ilevkivskyi
ilevkivskyi deleted the fix-instance-overlap branch February 9, 2025 09:08
x612skm pushed a commit to x612skm/mypy-dev that referenced this pull request Feb 24, 2025
Fixes python#18105

When I implemented this initially, I only handled tuples, but forgot
instances, thus causing the crash. I don't add many tests, since the
instance overlap check simply relays to the tuple one, that is already
tested.

(Btw I already forgot how verbose everything is in the `TypeVarTuple`
world :-))
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.

Assertion fails in is_overlapping_types() when comparing Unpack TypeVarTuple with default type

2 participants