From b80b2e4b98aa516dff6b73b75e11dd1766883b99 Mon Sep 17 00:00:00 2001 From: Maxim Kurnikov Date: Tue, 5 Mar 2019 12:15:25 +0300 Subject: [PATCH] make IMapIterator a subclass of Iterator (#2814) --- stdlib/2/multiprocessing/pool.pyi | 2 +- stdlib/3/multiprocessing/pool.pyi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/2/multiprocessing/pool.pyi b/stdlib/2/multiprocessing/pool.pyi index 2691bd067..4001a5a2b 100644 --- a/stdlib/2/multiprocessing/pool.pyi +++ b/stdlib/2/multiprocessing/pool.pyi @@ -11,7 +11,7 @@ class AsyncResult(): def ready(self) -> bool: ... def successful(self) -> bool: ... -class IMapIterator(Iterable[Any]): +class IMapIterator(Iterator[Any]): def __iter__(self) -> Iterator[Any]: ... def next(self, timeout: Optional[float] = ...) -> Any: ... diff --git a/stdlib/3/multiprocessing/pool.pyi b/stdlib/3/multiprocessing/pool.pyi index b8e9facd5..49c7d9c20 100644 --- a/stdlib/3/multiprocessing/pool.pyi +++ b/stdlib/3/multiprocessing/pool.pyi @@ -1,6 +1,6 @@ from typing import ( Any, Callable, ContextManager, Iterable, Mapping, Optional, List, - TypeVar, Generic, + TypeVar, Generic, Iterator ) _PT = TypeVar('_PT', bound='Pool') @@ -15,7 +15,7 @@ class AsyncResult(Generic[_T]): _IMIT = TypeVar('_IMIT', bound=IMapIterator) -class IMapIterator(Iterable[_T]): +class IMapIterator(Iterator[_T]): def __iter__(self: _IMIT) -> _IMIT: ... def next(self, timeout: Optional[float] = ...) -> _T: ... def __next__(self, timeout: Optional[float] = ...) -> _T: ...