Skip to content

Commit c015c58

Browse files
committed
TypeAliasType type_params accepts typing_extensions.TypeVar also
1 parent bbe48c7 commit c015c58

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

stdlib/typing.pyi

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ from types import (
2121
WrapperDescriptorType,
2222
)
2323
from typing_extensions import Never as _Never, ParamSpec as _ParamSpec, deprecated
24+
import typing_extensions
2425

2526
if sys.version_info >= (3, 14):
2627
from _typeshed import EvaluateFunc
@@ -1136,7 +1137,18 @@ if sys.version_info >= (3, 12):
11361137
def override(method: _F, /) -> _F: ...
11371138
@final
11381139
class TypeAliasType:
1139-
def __new__(cls, name: str, value: Any, *, type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ()) -> Self: ...
1140+
def __new__(
1141+
cls,
1142+
name: str,
1143+
value: Any,
1144+
*,
1145+
type_params: tuple[
1146+
TypeVar | typing_extensions.TypeVar |
1147+
ParamSpec | typing_extensions.ParamSpec |
1148+
TypeVarTuple | typing_extensions.TypeVarTuple,
1149+
...
1150+
] = ()
1151+
) -> Self: ...
11401152
@property
11411153
def __value__(self) -> Any: ... # AnnotationForm
11421154
@property

0 commit comments

Comments
 (0)