mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 10:26:31 +08:00
Fix return type for GenericAlias.__origin__ for type aliases parameterised with a type (#13619)
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user