Skip to content

collections.deque.__rmul__ is missing #16034

Description

@OutSquareCapital

The following snippet is valid runtime code:

from collections import deque

print(3 * deque([1, 2, 3]))

output:

> uv run t.py
deque([1, 2, 3, 1, 2, 3, 1, 2, 3])

But typeshed doesn't have the __rmul__ dunder specified, so type checkers are complaining.

This is also tested in the python test suite here.

Note

Tested with basedpyright v1.39.9 and python 3.13.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: incompleteAnnotations or sub-modules missing from an existing package or module

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions