mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Always return Iterator, not Iterable for __iter__ (#8361)
This commit is contained in:
@@ -15,7 +15,7 @@ class InputWrapper:
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self, size: int = ...) -> bytes: ...
|
||||
def readlines(self, hint: int = ...) -> bytes: ...
|
||||
def __iter__(self) -> Iterable[bytes]: ...
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def close(self) -> NoReturn: ...
|
||||
|
||||
class ErrorWrapper:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from collections.abc import Callable, Iterable, Iterator, Sequence
|
||||
from types import ModuleType
|
||||
from typing import IO, Any
|
||||
|
||||
@@ -64,7 +64,7 @@ class FlagValues:
|
||||
SetDefault = set_default
|
||||
def __contains__(self, name: str) -> bool: ...
|
||||
has_key = __contains__
|
||||
def __iter__(self) -> Iterable[str]: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __call__(self, argv: list[str], known_only: bool = ...) -> list[str]: ...
|
||||
def reset(self) -> None: ...
|
||||
Reset = reset
|
||||
|
||||
Reference in New Issue
Block a user