Skip to content

Commit

Permalink
collections: remove redundant method redefinitions (#6630)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Dec 19, 2021
1 parent 5dcca3f commit e691153
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions stdlib/collections/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ class UserList(MutableSequence[_T]):
def insert(self, i: int, item: _T) -> None: ...
def pop(self, i: int = ...) -> _T: ...
def remove(self, item: _T) -> None: ...
def clear(self) -> None: ...
def copy(self: _S) -> _S: ...
def count(self, item: _T) -> int: ...
# All arguments are passed to `list.index` at runtime, so the signature should be kept in line with `list.index`.
def index(self, item: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...) -> int: ...
def reverse(self) -> None: ...
# All arguments are passed to `list.sort` at runtime, so the signature should be kept in line with `list.sort`.
@overload
def sort(self: UserList[SupportsRichComparisonT], *, key: None = ..., reverse: bool = ...) -> None: ...
Expand Down Expand Up @@ -190,7 +188,6 @@ class deque(MutableSequence[_T], Generic[_T]):
def __init__(self, iterable: Iterable[_T] = ..., maxlen: int | None = ...) -> None: ...
def append(self, __x: _T) -> None: ...
def appendleft(self, __x: _T) -> None: ...
def clear(self) -> None: ...
def copy(self: _S) -> _S: ...
def count(self, __x: _T) -> int: ...
def extend(self, __iterable: Iterable[_T]) -> None: ...
Expand All @@ -200,19 +197,16 @@ class deque(MutableSequence[_T], Generic[_T]):
def pop(self) -> _T: ... # type: ignore[override]
def popleft(self) -> _T: ...
def remove(self, __value: _T) -> None: ...
def reverse(self) -> None: ...
def rotate(self, __n: int = ...) -> None: ...
def __copy__(self: _S) -> _S: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T]: ...
def __str__(self) -> str: ...
# These methods of deque don't take slices, unlike MutableSequence, hence the type: ignores
def __getitem__(self, __index: SupportsIndex) -> _T: ... # type: ignore[override]
def __setitem__(self, __i: SupportsIndex, __x: _T) -> None: ... # type: ignore[override]
def __delitem__(self, __i: SupportsIndex) -> None: ... # type: ignore[override]
def __contains__(self, __o: object) -> bool: ...
def __reduce__(self: Self) -> tuple[Type[Self], tuple[()], None, Iterator[_T]]: ...
def __reversed__(self) -> Iterator[_T]: ...
def __iadd__(self: _S, __iterable: Iterable[_T]) -> _S: ...
def __add__(self: _S, __other: _S) -> _S: ...
def __mul__(self: _S, __other: int) -> _S: ...
Expand Down

0 comments on commit e691153

Please sign in to comment.