[types] Make UnionType.__getitem__ parameter positional-only (#15458)

This commit is contained in:
Brian Schubert
2026-02-23 12:06:19 -05:00
committed by GitHub
parent 6ee36bacec
commit 2b36c453e8
+1 -1
View File
@@ -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