Add __class_getitem__ methods new in py313 (#12029)

This commit is contained in:
Alex Waygood
2024-05-24 15:11:22 -04:00
committed by GitHub
parent 1781cde60a
commit 0152a6c134
3 changed files with 8 additions and 4 deletions

View File

@@ -358,6 +358,8 @@ class GeneratorType(Generator[_YieldT_co, _SendT_contra, _ReturnT_co]):
) -> _YieldT_co: ...
@overload
def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co: ...
if sys.version_info >= (3, 13):
def __class_getitem__(cls, item: Any, /) -> Any: ...
@final
class AsyncGeneratorType(AsyncGenerator[_YieldT_co, _SendT_contra]):
@@ -401,6 +403,8 @@ class CoroutineType(Coroutine[_YieldT_co, _SendT_contra, _ReturnT_co]):
) -> _YieldT_co: ...
@overload
def throw(self, typ: BaseException, val: None = None, tb: TracebackType | None = ..., /) -> _YieldT_co: ...
if sys.version_info >= (3, 13):
def __class_getitem__(cls, item: Any, /) -> Any: ...
@final
class MethodType: