Skip to content

Using DictProxy.values() yields false positives #8814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
prauscher opened this issue Sep 30, 2022 · 1 comment · Fixed by #8815
Closed

Using DictProxy.values() yields false positives #8814

prauscher opened this issue Sep 30, 2022 · 1 comment · Fixed by #8815

Comments

@prauscher
Copy link
Contributor

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?

@AlexWaygood
Copy link
Member

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

Definitely typeshed :)

I've filed #8815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants