From 39d37ec54c7bc68acc79a4baa1e6f7adb6c6a3e1 Mon Sep 17 00:00:00 2001 From: Anh71me Date: Sun, 13 Nov 2022 22:45:56 +0800 Subject: [PATCH] types: add `__getitem__` on `GenericAlias` (#9172) Co-authored-by: Jelle Zijlstra --- stdlib/types.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index c282ab5b8..4047cf845 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -585,6 +585,7 @@ if sys.version_info >= (3, 9): @property def __parameters__(self) -> tuple[Any, ...]: ... def __init__(self, origin: type, args: Any) -> None: ... + def __getitem__(self, __typeargs: Any) -> GenericAlias: ... if sys.version_info >= (3, 11): @property def __unpacked__(self) -> bool: ...