Skip to content

Using DictProxy.values() yields false positives #8814

Closed
@prauscher

Description

@prauscher

If I run mypy with the following code:

from multiprocessing.managers import DictProxy
from multiprocessing import Manager

d: DictProxy[str, float] = Manager().dict()

d["hallo"] = 4.2
d["test"] = 2.8

print(sum(d.values()))

It should give no typing errors, as the values of DictProxy should be an Iterable[float]. Instead however, i receive error: Argument 1 to "sum" has incompatible type "List[Tuple[str, float]]"; expected "Iterable[bool]" for line 9 (the print-line)

Is this an issue with typeshed or more with the python multiprocessing-library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions