mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
More precise type for TypeAliasType.__getitem__ (#12354)
At runtime, this always returns a GenericAlias; see typealias_subscript in Objects/typevarobject.c. See microsoft/pyright#8444.
This commit is contained in:
@@ -1056,7 +1056,7 @@ if sys.version_info >= (3, 12):
|
||||
# It's writable on types, but not on instances of TypeAliasType.
|
||||
@property
|
||||
def __module__(self) -> str | None: ... # type: ignore[override]
|
||||
def __getitem__(self, parameters: Any) -> Any: ...
|
||||
def __getitem__(self, parameters: Any) -> GenericAlias: ...
|
||||
def __or__(self, right: Any) -> _SpecialForm: ...
|
||||
def __ror__(self, left: Any) -> _SpecialForm: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user