Fix positional-only differences in many stdlib modules (#7226)

This commit is contained in:
Alex Waygood
2022-02-15 14:14:06 +00:00
committed by GitHub
parent 32e9a0fbc1
commit f4967618dd
10 changed files with 23 additions and 23 deletions

View File

@@ -59,14 +59,14 @@ class mmap(AbstractContextManager[mmap], Iterable[int], Sized):
def read(self, n: int | None = ...) -> bytes: ...
def write(self, bytes: ReadableBuffer) -> int: ...
@overload
def __getitem__(self, index: int) -> int: ...
def __getitem__(self, __index: int) -> int: ...
@overload
def __getitem__(self, index: slice) -> bytes: ...
def __delitem__(self, index: int | slice) -> NoReturn: ...
def __getitem__(self, __index: slice) -> bytes: ...
def __delitem__(self, __index: int | slice) -> NoReturn: ...
@overload
def __setitem__(self, index: int, object: int) -> None: ...
def __setitem__(self, __index: int, __object: int) -> None: ...
@overload
def __setitem__(self, index: slice, object: ReadableBuffer) -> None: ...
def __setitem__(self, __index: slice, __object: ReadableBuffer) -> None: ...
# Doesn't actually exist, but the object is actually iterable because it has __getitem__ and
# __len__, so we claim that there is also an __iter__ to help type checkers.
def __iter__(self) -> Iterator[int]: ...