We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Bug Report
This raises no issues in 1.6.1, but does in 1.7
To Reproduce
https://mypy-play.net/?mypy=1.7.0&python=3.11&gist=8ba136e1df27dd669f8a881052b6a3b4
from collections.abc import Mapping from typing import Any def make_plot(subplot_kwargs: Mapping[str, Any]) -> None: subplot_kwargs = { # raises [operator] "option1": "default1", "option2": "default2", } | subplot_kwargs # plotfn(..., **subplot_kwargs)
main.py:6: error: No overload variant of "__or__" of "dict" matches argument type "Mapping[str, Any]" [operator] main.py:6: note: Possible overload variants: main.py:6: note: def __or__(self, dict[str, str], /) -> dict[str, str] main.py:6: note: def [_T1, _T2] __or__(self, dict[_T1, _T2], /) -> dict[str | _T1, str | _T2]
The text was updated successfully, but these errors were encountered:
This is python/typeshed#10679 and the error is correct: dict.__or__ doesn't accept arbitrary Mappings.
dict.__or__
Sorry, something went wrong.
No branches or pull requests
Bug Report
This raises no issues in 1.6.1, but does in 1.7
To Reproduce
https://mypy-play.net/?mypy=1.7.0&python=3.11&gist=8ba136e1df27dd669f8a881052b6a3b4
The text was updated successfully, but these errors were encountered: