Skip to content

Commit e704c07

Browse files
committed
Downgrade syntax related to type statement, TypeVarTuple, and Unpack, for Python 3.9 - 3.11
1 parent ca6f8a5 commit e704c07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test-data/unit/check-typeform.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,13 +694,15 @@ from typing import (
694694
)
695695
from typing_extensions import (
696696
Annotated, Concatenate, Never, TypeAlias, TypeForm, TypeIs,
697+
TypeVarTuple, Unpack,
697698
)
698699
#
699700
class SomeClass:
700701
pass
701702
SomeTypeAlias: TypeAlias = SomeClass
702703
SomeTypeVar = TypeVar('SomeTypeVar')
703-
type IntTuple[*Ts] = tuple[int, *Ts]
704+
Ts = TypeVarTuple('Ts')
705+
IntTuple: TypeAlias = tuple[int, Unpack[Ts]]
704706
P = ParamSpec('P')
705707
R = TypeVar('R')
706708
#

0 commit comments

Comments
 (0)