mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
make IMapIterator a subclass of Iterator (#2814)
This commit is contained in:
committed by
Sebastian Rittau
parent
f569957bbe
commit
b80b2e4b98
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user