-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-pep-646PEP 646 (TypeVarTuple, Unpack)PEP 646 (TypeVarTuple, Unpack)
Description
Bug Report
Blah[()] works sometimes when Blah[Unpack[tuple[()]]] doesn't and that doesn't make sense.
To Reproduce
from typing import Generic, TypeVarTuple, Unpack
Ts = TypeVarTuple("Ts")
class Blah(Generic[Unpack[Ts]]):
pass
x: Blah[()] # works
y: Blah[Unpack[tuple[()]]] # E: Missing type parameters for generic type "Blah[()]"Expected Behavior
Both should work.
Actual Behavior
Only first works.
Your Environment
Checked on mypy playground.
- Mypy version used: v1.14
- Mypy command-line flags: strict
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: 3.12
jorenham
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-pep-646PEP 646 (TypeVarTuple, Unpack)PEP 646 (TypeVarTuple, Unpack)