-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: use standard method to set unhashable object #36717
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
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.
lgtm
pandas/core/generic.py
Outdated
f"{repr(type(self).__name__)} objects are mutable, " | ||
f"thus they cannot be hashed" | ||
) | ||
__hash__ = None |
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.
can you add a comment / ref for this
ci checks is failing as well |
If hash=None is the desired way to indicate unhashable object, this could be a mypy issue. |
xref python/mypy#4266 |
close for now. It doesn't work with mypy. |
#20589 mentioned lgtm. So I decided to test it. And it found this potential improvement. There is even a detailed reference with code examples. https://lgtm.com/rules/1780095/ Very interesting.
Just trying to see if their suggestion works.