Skip to content

Commit c3f2611

Browse files
fix(collections): add deque reverse multiplication
Declare `deque.__rmul__` so type checkers accept multiplication with an integer on the left. Refs: #16034 Signed-off-by: Jason Scheffel <contact@jasonscheffel.com>
1 parent 35c51b4 commit c3f2611

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

stdlib/collections/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ class deque(MutableSequence[_T]):
277277
def __iadd__(self, value: Iterable[_T], /) -> Self: ...
278278
def __add__(self, value: Self, /) -> Self: ...
279279
def __mul__(self, value: int, /) -> Self: ...
280+
def __rmul__(self, value: int, /) -> Self: ...
280281
def __imul__(self, value: int, /) -> Self: ...
281282
def __lt__(self, value: deque[_T], /) -> bool: ...
282283
def __le__(self, value: deque[_T], /) -> bool: ...

0 commit comments

Comments
 (0)