Add type annotation for collections.deque.__iadd__ (#2774)

* Add type annotation for collections.deque.__iadd__

Fixes #2771.
This commit is contained in:
Joel Rosdahl
2019-02-01 19:39:09 +01:00
committed by Sebastian Rittau
parent caefaa6af9
commit 3eb66ba633
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -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)
+3
View File
@@ -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]: ...