Skip to content

Commit d04d532

Browse files
authored
Fix return type for GenericAlias.__origin__ for type aliases parameterised with a type (#13619)
1 parent 1a9eef4 commit d04d532

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/types.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ from importlib.machinery import ModuleSpec
1818

1919
# pytype crashes if types.MappingProxyType inherits from collections.abc.Mapping instead of typing.Mapping
2020
from typing import Any, ClassVar, Literal, Mapping, TypeVar, final, overload # noqa: Y022
21-
from typing_extensions import ParamSpec, Self, TypeVarTuple, deprecated
21+
from typing_extensions import ParamSpec, Self, TypeAliasType, TypeVarTuple, deprecated
2222

2323
__all__ = [
2424
"FunctionType",
@@ -650,7 +650,7 @@ def coroutine(func: _Fn) -> _Fn: ...
650650
if sys.version_info >= (3, 9):
651651
class GenericAlias:
652652
@property
653-
def __origin__(self) -> type: ...
653+
def __origin__(self) -> type | TypeAliasType: ...
654654
@property
655655
def __args__(self) -> tuple[Any, ...]: ...
656656
@property

0 commit comments

Comments
 (0)