mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Fix stubs for async generator methods (#12232)
This commit is contained in:
@@ -542,16 +542,18 @@ class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]):
|
||||
class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra]):
|
||||
def __anext__(self) -> Awaitable[_YieldT_co]: ...
|
||||
@abstractmethod
|
||||
def asend(self, value: _SendT_contra, /) -> Awaitable[_YieldT_co]: ...
|
||||
def asend(self, value: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]: ...
|
||||
@overload
|
||||
@abstractmethod
|
||||
def athrow(
|
||||
self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None, /
|
||||
) -> Awaitable[_YieldT_co]: ...
|
||||
) -> Coroutine[Any, Any, _YieldT_co]: ...
|
||||
@overload
|
||||
@abstractmethod
|
||||
def athrow(self, typ: BaseException, val: None = None, tb: TracebackType | None = None, /) -> Awaitable[_YieldT_co]: ...
|
||||
def aclose(self) -> Awaitable[None]: ...
|
||||
def athrow(
|
||||
self, typ: BaseException, val: None = None, tb: TracebackType | None = None, /
|
||||
) -> Coroutine[Any, Any, _YieldT_co]: ...
|
||||
def aclose(self) -> Coroutine[Any, Any, None]: ...
|
||||
@property
|
||||
def ag_await(self) -> Any: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user