Skip to content

Commit f1f3c12

Browse files
authored
TypeAliasType type_params accepts typing_extensions.TypeVar also (#14840)
1 parent bbe48c7 commit f1f3c12

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

stdlib/typing.pyi

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,21 @@ if sys.version_info >= (3, 12):
11361136
def override(method: _F, /) -> _F: ...
11371137
@final
11381138
class TypeAliasType:
1139-
def __new__(cls, name: str, value: Any, *, type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ()) -> Self: ...
1139+
def __new__(
1140+
cls,
1141+
name: str,
1142+
value: Any,
1143+
*,
1144+
type_params: tuple[
1145+
TypeVar
1146+
| typing_extensions.TypeVar
1147+
| ParamSpec
1148+
| typing_extensions.ParamSpec
1149+
| TypeVarTuple
1150+
| typing_extensions.TypeVarTuple,
1151+
...,
1152+
] = (),
1153+
) -> Self: ...
11401154
@property
11411155
def __value__(self) -> Any: ... # AnnotationForm
11421156
@property

0 commit comments

Comments
 (0)