Always return Iterator, not Iterable for __iter__ (#8361)

This commit is contained in:
Nikita Sobolev
2022-07-22 10:10:58 +03:00
committed by GitHub
parent 1a8a49e671
commit fab1b59715
2 changed files with 3 additions and 3 deletions

View File

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

View File

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