Bug Report
When a type has multiple generics and is an iterable, the star operator results in the wrong type
fromtypingimportIterator, Generic, TypeVarT=TypeVar("T")
T2=TypeVar("T2")
classA(Iterator[T2], Generic[T, T2]):
...
a: A[int, Iterator[int]]
reveal_type((*a,))
b: list[list[int]] = [*a]To Reproduce
(Write your steps here:)
- Step 1...
- Step 2...
- Step 3...
Expected Behavior
(Write what you thought would happen.)
Actual Behavior
(Write what happened.)
Your Environment
- Mypy version used: 0.910
- Mypy command-line flags: na
- Mypy configuration options from
mypy.ini (and other config files): na - Python version used: 3.10
- Operating system and version: mypy playground
Bug Report
When a type has multiple generics and is an iterable, the star operator results in the wrong type
To Reproduce
(Write your steps here:)
Expected Behavior
(Write what you thought would happen.)
Actual Behavior
(Write what happened.)
Your Environment
mypy.ini(and other config files): na