Closed
Description
Bug Report
Using reveal_type()
on a variable whose type is a variable-length tuple shows misleading output.
While it's different from the output for a fixed-length tuple (which shows Tuple[builtins.int]
), it doesn't clearly indicate that the type is variable-length.
Note that with PEP 585 accepted, eventually we'll have to use builtins.tuple
(or, I'd recomment, plain tuple
) for both situations.
To Reproduce
from typing import Tuple
a: Tuple[int, ...]
reveal_type(a)
Expected Behavior
t.py:3: note: Revealed type is 'builtins.tuple[builtins.int, ...]'
or
t.py:3: note: Revealed type is 'Tuple[builtins.int, ...]'
Actual Behavior
t.py:3: note: Revealed type is 'builtins.tuple[builtins.int]'
Your Environment
Master or 0.782, no flags.