diff --git a/stdlib/collections/__init__.pyi b/stdlib/collections/__init__.pyi index 3e2e838eaa26..9380fc426ddc 100644 --- a/stdlib/collections/__init__.pyi +++ b/stdlib/collections/__init__.pyi @@ -148,12 +148,12 @@ class UserList(MutableSequence[_T]): def __add__(self, other: Iterable[_T]) -> Self: ... def __radd__(self, other: Iterable[_T]) -> Self: ... def __iadd__(self, other: Iterable[_T]) -> Self: ... - def __mul__(self, n: int) -> Self: ... - def __rmul__(self, n: int) -> Self: ... - def __imul__(self, n: int) -> Self: ... + def __mul__(self, n: SupportsIndex) -> Self: ... + def __rmul__(self, n: SupportsIndex) -> Self: ... + def __imul__(self, n: SupportsIndex) -> Self: ... def append(self, item: _T) -> None: ... - def insert(self, i: int, item: _T) -> None: ... - def pop(self, i: int = -1) -> _T: ... + def insert(self, i: SupportsIndex, item: _T) -> None: ... + def pop(self, i: SupportsIndex = -1) -> _T: ... def remove(self, item: _T) -> None: ... def copy(self) -> Self: ... def __copy__(self) -> Self: ... @@ -259,12 +259,12 @@ class deque(MutableSequence[_T]): def count(self, x: _T, /) -> int: ... def extend(self, iterable: Iterable[_T], /) -> None: ... def extendleft(self, iterable: Iterable[_T], /) -> None: ... - def insert(self, i: int, x: _T, /) -> None: ... - def index(self, x: _T, start: int = 0, stop: int = ..., /) -> int: ... + def insert(self, i: SupportsIndex, x: _T, /) -> None: ... + def index(self, x: _T, start: SupportsIndex = 0, stop: SupportsIndex = ..., /) -> int: ... def pop(self) -> _T: ... # type: ignore[override] def popleft(self) -> _T: ... def remove(self, value: _T, /) -> None: ... - def rotate(self, n: int = 1, /) -> None: ... + def rotate(self, n: SupportsIndex = 1, /) -> None: ... def __copy__(self) -> Self: ... def __len__(self) -> int: ... __hash__: ClassVar[None] # type: ignore[assignment] @@ -276,9 +276,9 @@ class deque(MutableSequence[_T]): def __reduce__(self) -> tuple[type[Self], tuple[()], None, Iterator[_T]]: ... def __iadd__(self, value: Iterable[_T], /) -> Self: ... def __add__(self, value: Self, /) -> Self: ... - def __mul__(self, value: int, /) -> Self: ... - def __rmul__(self, value: int, /) -> Self: ... - def __imul__(self, value: int, /) -> Self: ... + def __mul__(self, value: SupportsIndex, /) -> Self: ... + def __rmul__(self, value: SupportsIndex, /) -> Self: ... + def __imul__(self, value: SupportsIndex, /) -> Self: ... def __lt__(self, value: deque[_T], /) -> bool: ... def __le__(self, value: deque[_T], /) -> bool: ... def __gt__(self, value: deque[_T], /) -> bool: ...