Add missing __eq__ to Mapping#10297
Merged
AlexWaygood merged 3 commits intopython:mainfrom Jun 10, 2023
Dreamsorcerer:patch-26
Merged
Add missing __eq__ to Mapping#10297AlexWaygood merged 3 commits intopython:mainfrom Dreamsorcerer:patch-26
AlexWaygood merged 3 commits intopython:mainfrom
Dreamsorcerer:patch-26
Conversation
Dreamsorcerer
commented
Jun 10, 2023
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
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). |
AlexWaygood
reviewed
Jun 10, 2023
AlexWaygood
reviewed
Jun 10, 2023
Member
AlexWaygood
left a comment
There was a problem hiding this comment.
This looks good, just one comment — see above
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Contributor
|
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]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/python/cpython/blob/main/Lib/_collections_abc.py#L831