make IMapIterator a subclass of Iterator (#2814)

This commit is contained in:
Maxim Kurnikov
2019-03-05 12:15:25 +03:00
committed by Sebastian Rittau
parent f569957bbe
commit b80b2e4b98
2 changed files with 3 additions and 3 deletions

View File

@@ -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: ...

View File

@@ -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: ...