Fix abstract classes in 2.7 (#2247)

Part of #1476.
This commit is contained in:
Jelle Zijlstra
2018-06-17 09:21:17 -07:00
committed by Ivan Levkivskyi
parent 6b36b1befe
commit 8084dc1c1f
6 changed files with 55 additions and 34 deletions

View File

@@ -1,11 +1,9 @@
# Stubs for multiprocessing.pool (Python 2)
from typing import (
Any, Callable, ContextManager, Iterable, Mapping, Optional, Dict, List,
TypeVar,
Any, Callable, ContextManager, Iterable, Optional, Dict, List,
TypeVar, Iterator,
)
_T = TypeVar('_T', bound='Pool')
_T = TypeVar('_T', bound=Pool)
class AsyncResult():
def get(self, timeout: Optional[float] = ...) -> Any: ...
@@ -14,6 +12,7 @@ class AsyncResult():
def successful(self) -> bool: ...
class IMapIterator(Iterable[Any]):
def __iter__(self) -> Iterator[Any]: ...
def next(self, timeout: Optional[float] = ...) -> Any: ...
class Pool(ContextManager[Pool]):