From 5ccf017ca06a83511df49143226757d3bb7a33d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E8=91=89?= Date: Thu, 12 Sep 2019 00:20:40 +0800 Subject: [PATCH] fix: Add MapResult type (#3228) --- stdlib/3/multiprocessing/pool.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/3/multiprocessing/pool.pyi b/stdlib/3/multiprocessing/pool.pyi index 2b0fbd078..fe1045d0a 100644 --- a/stdlib/3/multiprocessing/pool.pyi +++ b/stdlib/3/multiprocessing/pool.pyi @@ -17,6 +17,8 @@ class ApplyResult(Generic[_T]): # alias created during issue #17805 AsyncResult = ApplyResult +class MapResult(ApplyResult[List[_T]]): ... + _IMIT = TypeVar('_IMIT', bound=IMapIterator) class IMapIterator(Iterator[_T]): @@ -50,7 +52,7 @@ class Pool(ContextManager[Pool]): iterable: Iterable[_S] = ..., chunksize: Optional[int] = ..., callback: Optional[Callable[[_T], None]] = ..., - error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult[List[_T]]: ... + error_callback: Optional[Callable[[BaseException], None]] = ...) -> MapResult[List[_T]]: ... def imap(self, func: Callable[[_S], _T], iterable: Iterable[_S] = ...,