mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[types] Make UnionType.__getitem__ parameter positional-only (#15458)
This commit is contained in:
+1
-1
@@ -733,7 +733,7 @@ if sys.version_info >= (3, 10):
|
||||
def __hash__(self) -> int: ...
|
||||
# you can only subscript a `UnionType` instance if at least one of the elements
|
||||
# in the union is a generic alias instance that has a non-empty `__parameters__`
|
||||
def __getitem__(self, parameters: Any) -> object: ...
|
||||
def __getitem__(self, parameters: Any, /) -> object: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
@final
|
||||
|
||||
Reference in New Issue
Block a user