FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add missing __eq__ to Mapping by Dreamsorcerer · Pull Request #10297 · python/typeshed · GitHub

Repository navigation

Add missing __eq__ to Mapping - #10297

Merged
AlexWaygood merged 3 commits into
python:mainfrom
Dreamsorcerer:patch-26
Jun 10, 2023
Merged

AlexWaygood merged 3 commits into
python:mainfrom
Dreamsorcerer:patch-26

Conversation

Copy link
Copy Markdown
Contributor

Comment thread stdlib/typing.pyi Outdated

This comment has been minimized.

Copy link
Copy Markdown
Contributor Author

The new error from mypy primer is because they've typed it with Self[K], should be fine for them to type it as object like everything else:
https://github.com/ibis-project/ibis/blob/master/ibis/common/egraph.py#L101

The removed errors from streamlit are exactly the false positives that caused me to look at this (but, in a different library).

Comment thread stdlib/typing.pyi Outdated

AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks good, just one comment — see above

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

Copy link
Copy Markdown
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]

AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL