diff --git a/stdlib/collections/__init__.pyi b/stdlib/collections/__init__.pyi index e8f4c99d1..8ed449ab8 100644 --- a/stdlib/collections/__init__.pyi +++ b/stdlib/collections/__init__.pyi @@ -206,20 +206,10 @@ class deque(MutableSequence[_T], Generic[_T]): def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... - # These methods of deque don't really take slices, but we need to - # define them as taking a slice to satisfy MutableSequence. - @overload - def __getitem__(self, __index: SupportsIndex) -> _T: ... - @overload - def __getitem__(self, __s: slice) -> MutableSequence[_T]: ... - @overload - def __setitem__(self, __i: SupportsIndex, __x: _T) -> None: ... - @overload - def __setitem__(self, __s: slice, __o: Iterable[_T]) -> None: ... - @overload - def __delitem__(self, __i: SupportsIndex) -> None: ... - @overload - def __delitem__(self, __s: slice) -> None: ... + # 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]: ...