diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index 1cde078da..c7183c342 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -183,7 +183,8 @@ class UserString(Sequence[str]): def zfill(self: _UserStringT, width: int) -> _UserStringT: ... -# Technically, deque only derives from MutableSequence in 3.5. +# Technically, deque only derives from MutableSequence in 3.5 (before then, the insert and index +# methods did not exist). # But in practice it's not worth losing sleep over. class deque(MutableSequence[_T], Generic[_T]): maxlen = ... # type: Optional[int] # TODO readonly @@ -197,9 +198,8 @@ class deque(MutableSequence[_T], Generic[_T]): def count(self, x: _T) -> int: ... def extend(self, iterable: Iterable[_T]) -> None: ... def extendleft(self, iterable: Iterable[_T]) -> None: ... - if sys.version_info >= (3, 5): - def insert(self, i: int, x: _T) -> None: ... - def index(self, x: _T, start: int = ..., stop: int = ...) -> int: ... + def insert(self, i: int, x: _T) -> None: ... + def index(self, x: _T, start: int = ..., stop: int = ...) -> int: ... def pop(self, i: int = ...) -> _T: ... def popleft(self) -> _T: ... def remove(self, value: _T) -> None: ...