From ad803e1caa9764e8778ce558fb99e7d4cca3cda9 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Mon, 21 Jan 2019 20:57:15 +0000 Subject: [PATCH] builtins.pyi: Update __iadd__() and imul() in class list (#2754) Fixes #2711 --- stdlib/2/__builtin__.pyi | 4 ++-- stdlib/2and3/builtins.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index b509195b7..cc72f4758 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -907,11 +907,11 @@ class list(MutableSequence[_T], Generic[_T]): def __setslice__(self, start: int, stop: int, o: Sequence[_T]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __add__(self, x: List[_T]) -> List[_T]: ... - def __iadd__(self, x: Iterable[_T]) -> List[_T]: ... + def __iadd__(self: _S, x: Iterable[_T]) -> _S: ... def __mul__(self, n: int) -> List[_T]: ... def __rmul__(self, n: int) -> List[_T]: ... if sys.version_info >= (3,): - def __imul__(self, n: int) -> List[_T]: ... + def __imul__(self: _S, n: int) -> _S: ... def __contains__(self, o: object) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... def __gt__(self, x: List[_T]) -> bool: ... diff --git a/stdlib/2and3/builtins.pyi b/stdlib/2and3/builtins.pyi index b509195b7..cc72f4758 100644 --- a/stdlib/2and3/builtins.pyi +++ b/stdlib/2and3/builtins.pyi @@ -907,11 +907,11 @@ class list(MutableSequence[_T], Generic[_T]): def __setslice__(self, start: int, stop: int, o: Sequence[_T]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __add__(self, x: List[_T]) -> List[_T]: ... - def __iadd__(self, x: Iterable[_T]) -> List[_T]: ... + def __iadd__(self: _S, x: Iterable[_T]) -> _S: ... def __mul__(self, n: int) -> List[_T]: ... def __rmul__(self, n: int) -> List[_T]: ... if sys.version_info >= (3,): - def __imul__(self, n: int) -> List[_T]: ... + def __imul__(self: _S, n: int) -> _S: ... def __contains__(self, o: object) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... def __gt__(self, x: List[_T]) -> bool: ...