-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add missing __eq__ to Mapping #10297
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
Conversation
This comment has been minimized.
This comment has been minimized.
The new error from mypy primer is because they've typed it with The removed errors from streamlit are exactly the false positives that caused me to look at this (but, in a different library). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, just one comment — see above
Co-authored-by: Alex Waygood <[email protected]>
Diff from mypy_primer, showing the effect of this PR on open source code: ibis (https://github.com/ibis-project/ibis)
+ ibis/common/egraph.py:101: error: Argument 1 of "__eq__" is incompatible with supertype "Mapping"; supertype defines the argument type as "object" [override]
streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/connections/base_connection_test.py: note: In member "test_secrets_property_no_matching_section" of class "ExperimentalBaseConnectionDefaultMethodTests":
- lib/tests/streamlit/connections/base_connection_test.py:58:16: error: Non-overlapping equality check (left operand type: "AttrDict", right operand type: "Dict[<nothing>, <nothing>]") [comparison-overlap]
- lib/tests/streamlit/connections/base_connection_test.py: note: In member "test_secrets_property_no_secrets" of class "ExperimentalBaseConnectionDefaultMethodTests":
- lib/tests/streamlit/connections/base_connection_test.py:62:16: error: Non-overlapping equality check (left operand type: "AttrDict", right operand type: "Dict[<nothing>, <nothing>]") [comparison-overlap]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
https://github.com/python/cpython/blob/main/Lib/_collections_abc.py#L831