From 80425e8fcd875a657b96cf75f1148c62359b8c3a Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 26 Nov 2021 19:50:20 +0000 Subject: [PATCH] Add missing `__class_getitem__` method to `types.AsyncGeneratorType` (#6390) --- stdlib/types.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 65262ece0..c0f274538 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -218,6 +218,8 @@ class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]): @overload def athrow(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> Awaitable[_T_co]: ... def aclose(self) -> Awaitable[None]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, __item: Any) -> GenericAlias: ... @final class CoroutineType(Coroutine[_T_co, _T_contra, _V_co]):