mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add missing next method to iterators returned by Pool.imap (#1926)
This commit is contained in:
committed by
Jelle Zijlstra
parent
7e169a29c2
commit
74345aa898
@@ -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]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user