From f1f3c128011a6a1c223561c457a44625091a324c Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Mon, 6 Oct 2025 13:57:15 -0700 Subject: [PATCH] TypeAliasType type_params accepts typing_extensions.TypeVar also (#14840) --- stdlib/typing.pyi | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index ca25c92d5..9c18c879e 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -1136,7 +1136,21 @@ if sys.version_info >= (3, 12): def override(method: _F, /) -> _F: ... @final class TypeAliasType: - def __new__(cls, name: str, value: Any, *, type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ()) -> Self: ... + def __new__( + cls, + name: str, + value: Any, + *, + type_params: tuple[ + TypeVar + | typing_extensions.TypeVar + | ParamSpec + | typing_extensions.ParamSpec + | TypeVarTuple + | typing_extensions.TypeVarTuple, + ..., + ] = (), + ) -> Self: ... @property def __value__(self) -> Any: ... # AnnotationForm @property