Fix return type for GenericAlias.__origin__ for type aliases parameterised with a type (#13619)

This commit is contained in:
Dan Pascu
2025-03-11 18:11:19 +02:00
committed by GitHub
parent 1a9eef437a
commit d04d532337
+2 -2
View File
@@ -18,7 +18,7 @@ from importlib.machinery import ModuleSpec
# pytype crashes if types.MappingProxyType inherits from collections.abc.Mapping instead of typing.Mapping
from typing import Any, ClassVar, Literal, Mapping, TypeVar, final, overload # noqa: Y022
from typing_extensions import ParamSpec, Self, TypeVarTuple, deprecated
from typing_extensions import ParamSpec, Self, TypeAliasType, TypeVarTuple, deprecated
__all__ = [
"FunctionType",
@@ -650,7 +650,7 @@ def coroutine(func: _Fn) -> _Fn: ...
if sys.version_info >= (3, 9):
class GenericAlias:
@property
def __origin__(self) -> type: ...
def __origin__(self) -> type | TypeAliasType: ...
@property
def __args__(self) -> tuple[Any, ...]: ...
@property