diff --git a/stdlib/2/collections.pyi b/stdlib/2/collections.pyi index f61046e1c..3af54ea5b 100644 --- a/stdlib/2/collections.pyi +++ b/stdlib/2/collections.pyi @@ -21,6 +21,7 @@ from typing import ( ValuesView as ValuesView, ) +_S = TypeVar('_S') _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') @@ -53,6 +54,7 @@ class deque(Sized, Iterable[_T], Reversible[_T], Generic[_T]): def __setitem__(self, i: int, x: _T) -> None: ... def __contains__(self, o: _T) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... + def __iadd__(self: _S, iterable: Iterable[_T]) -> _S: ... _CounterT = TypeVar('_CounterT', bound=Counter) diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index e1b67e907..87e42cac7 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -42,6 +42,7 @@ if sys.version_info >= (3, 5): AsyncIterator as AsyncIterator, ) +_S = TypeVar('_S') _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') @@ -235,6 +236,8 @@ class deque(MutableSequence[_T], Generic[_T]): def __contains__(self, o: object) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... + def __iadd__(self: _S, iterable: Iterable[_T]) -> _S: ... + if sys.version_info >= (3, 5): def __add__(self, other: deque[_T]) -> deque[_T]: ... def __mul__(self, other: int) -> deque[_T]: ...