builtins: Fix typing of reversed (#10655)

This commit is contained in:
plokmijnuhby
2024-02-16 14:52:58 +00:00
committed by GitHub
parent 55dd99a338
commit c5c2c14db9
2 changed files with 36 additions and 2 deletions

View File

@@ -1634,9 +1634,9 @@ def quit(code: sys._ExitCode = None) -> NoReturn: ...
class reversed(Iterator[_T]):
@overload
def __init__(self, __sequence: Reversible[_T]) -> None: ...
def __new__(cls, __sequence: Reversible[_T]) -> Iterator[_T]: ... # type: ignore[misc]
@overload
def __init__(self, __sequence: SupportsLenAndGetItem[_T]) -> None: ...
def __new__(cls, __sequence: SupportsLenAndGetItem[_T]) -> Iterator[_T]: ... # type: ignore[misc]
def __iter__(self) -> Self: ...
def __next__(self) -> _T: ...
def __length_hint__(self) -> int: ...