From 261237548a00722e746d4e4348468df7b983fe0d Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Mon, 23 Feb 2026 11:34:51 -0500 Subject: [PATCH] Make `types.UnionType.__getitem__` parameter positional-only --- stdlib/types.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 568f6ea68d0b..e26c9447d2f7 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -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