Use async def instead of def ... -> Awaitable in typing (#7105)

This commit is contained in:
Nikita Sobolev
2022-02-02 15:14:08 +03:00
committed by GitHub
parent 90f5422df7
commit 970b8a676c
2 changed files with 13 additions and 13 deletions

View File

@@ -232,15 +232,15 @@ class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]):
ag_running: bool
ag_code: CodeType
def __aiter__(self) -> AsyncGeneratorType[_T_co, _T_contra]: ...
def __anext__(self) -> Awaitable[_T_co]: ...
def asend(self, __val: _T_contra) -> Awaitable[_T_co]: ...
async def __anext__(self) -> _T_co: ...
async def asend(self, __val: _T_contra) -> _T_co: ...
@overload
def athrow(
async def athrow(
self, __typ: type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
) -> Awaitable[_T_co]: ...
) -> _T_co: ...
@overload
def athrow(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> Awaitable[_T_co]: ...
def aclose(self) -> Awaitable[None]: ...
async def athrow(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> _T_co: ...
async def aclose(self) -> None: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...