diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 0d411c81bc86..4727bb409be0 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -87,6 +87,19 @@ class Hashable(metaclass=ABCMeta): @abstractmethod def __hash__(self) -> int: ... +class Awaitable(Generic[_T_co]): + @abstractmethod + def __await__(self) -> Iterator[_T_co]:... + +class AsyncIterable(Generic[_T_co]): + @abstractmethod + def __anext__(self) -> Awaitable[_T_co]:... + +class AsyncIterator(AsyncIterable[_T_co], Generic[_T_co]): + @abstractmethod + def __anext__(self) -> Awaitable[_T_co]:... + def __aiter__(self) -> 'AsyncIterator'[_T_co]:... + class Iterable(Generic[_T_co]): @abstractmethod def __iter__(self) -> Iterator[_T_co]: ... @@ -94,7 +107,7 @@ class Iterable(Generic[_T_co]): class Iterator(Iterable[_T_co], Generic[_T_co]): @abstractmethod def __next__(self) -> _T_co: ... - def __iter__(self) -> Iterator[_T_co]: ... + def __iter__(self) -> 'Iterator'[_T_co]: ... class Container(Generic[_T_co]): @abstractmethod