Add missing next method to iterators returned by Pool.imap (#1926)

This commit is contained in:
Takuya Akiba
2018-03-01 11:34:30 +09:00
committed by Jelle Zijlstra
parent 7e169a29c2
commit 74345aa898

View File

@@ -15,6 +15,9 @@ class AsyncResult():
def ready(self) -> bool: ...
def successful(self) -> bool: ...
class IMapIterator(Iterable[Any]):
def next(self, timeout: Optional[float] = ...) -> Any: ...
class Pool(ContextManager[Pool]):
def __init__(self, processes: Optional[int] = ...,
initializer: Optional[Callable[..., None]] = ...,
@@ -43,11 +46,11 @@ class Pool(ContextManager[Pool]):
def imap(self,
func: Callable[..., Any],
iterable: Iterable[Any] = ...,
chunksize: Optional[int] = ...) -> Iterable[Any]: ...
chunksize: Optional[int] = ...) -> IMapIterator: ...
def imap_unordered(self,
func: Callable[..., Any],
iterable: Iterable[Any] = ...,
chunksize: Optional[int] = ...) -> Iterable[Any]: ...
chunksize: Optional[int] = ...) -> IMapIterator: ...
def starmap(self,
func: Callable[..., Any],
iterable: Iterable[Iterable[Any]] = ...,