@@ -1036,11 +1036,16 @@ y: C
1036
1036
1037
1037
[case testTypeVarPreserved]
1038
1038
tv = TypeVar('tv')
1039
+ ps = ParamSpec('ps')
1040
+ tvt = TypeVarTuple('tvt')
1039
1041
1040
1042
[out]
1041
1043
from typing import TypeVar
1044
+ from typing_extensions import ParamSpec, TypeVarTuple
1042
1045
1043
1046
tv = TypeVar('tv')
1047
+ ps = ParamSpec('ps')
1048
+ tvt = TypeVarTuple('tvt')
1044
1049
1045
1050
[case testTypeVarArgsPreserved]
1046
1051
tv = TypeVar('tv', int, str)
@@ -1052,29 +1057,37 @@ tv = TypeVar('tv', int, str)
1052
1057
1053
1058
[case testTypeVarNamedArgsPreserved]
1054
1059
tv = TypeVar('tv', bound=bool, covariant=True)
1060
+ ps = ParamSpec('ps', bound=bool, covariant=True)
1055
1061
1056
1062
[out]
1057
1063
from typing import TypeVar
1064
+ from typing_extensions import ParamSpec
1058
1065
1059
1066
tv = TypeVar('tv', bound=bool, covariant=True)
1067
+ ps = ParamSpec('ps', bound=bool, covariant=True)
1060
1068
1061
1069
[case TypeVarImportAlias]
1062
- from typing import TypeVar as t_TV
1063
- from typing_extensions import TypeVar as te_TV
1070
+ from typing import TypeVar as t_TV, ParamSpec as t_PS
1071
+ from typing_extensions import TypeVar as te_TV, TypeVarTuple as te_TVT
1064
1072
from x import TypeVar as x_TV
1065
1073
1066
1074
T = t_TV('T')
1067
1075
U = te_TV('U')
1068
1076
V = x_TV('V')
1069
1077
1078
+ PS = t_PS('PS')
1079
+ TVT = te_TVT('TVT')
1080
+
1070
1081
[out]
1071
1082
from _typeshed import Incomplete
1072
- from typing import TypeVar as t_TV
1073
- from typing_extensions import TypeVar as te_TV
1083
+ from typing import ParamSpec as t_PS, TypeVar as t_TV
1084
+ from typing_extensions import TypeVar as te_TV, TypeVarTuple as te_TVT
1074
1085
1075
1086
T = t_TV('T')
1076
1087
U = te_TV('U')
1077
1088
V: Incomplete
1089
+ PS = t_PS('PS')
1090
+ TVT = te_TVT('TVT')
1078
1091
1079
1092
[case testTypeVarFromImportAlias]
1080
1093
import typing as t
@@ -1085,6 +1098,9 @@ T = t.TypeVar('T')
1085
1098
U = te.TypeVar('U')
1086
1099
V = x.TypeVar('V')
1087
1100
1101
+ PS = t.ParamSpec('PS')
1102
+ TVT = te.TypeVarTuple('TVT')
1103
+
1088
1104
[out]
1089
1105
import typing as t
1090
1106
import typing_extensions as te
@@ -1093,6 +1109,8 @@ from _typeshed import Incomplete
1093
1109
T = t.TypeVar('T')
1094
1110
U = te.TypeVar('U')
1095
1111
V: Incomplete
1112
+ PS = t.ParamSpec('PS')
1113
+ TVT = te.TypeVarTuple('TVT')
1096
1114
1097
1115
[case testTypeAliasPreserved]
1098
1116
alias = str
0 commit comments