-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove duplicate definitions, step 1 #8483
Conversation
This comment has been minimized.
This comment has been minimized.
…shed into remove-duplicates1
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
I did not verify the changes against the implementation, but the changes look reasonable and the lack of stubtest or other errors gives me enough confidence.
@@ -91,7 +91,6 @@ class TimerHandle(Handle): | |||
def __le__(self, other: TimerHandle) -> bool: ... | |||
def __gt__(self, other: TimerHandle) -> bool: ... | |||
def __ge__(self, other: TimerHandle) -> bool: ... | |||
def __eq__(self, other: object) -> bool: ... |
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.
After revisiting some implementation details, this is incorrect and needs to be reverted. Mypy treats ==
with strict_equliaty
differently with __eq__
defined in class and in object
super-class.
So, I will revert all __eq__
changes.
I've removed all duplicates found by python/mypy#13321 from modules starting with
_
anda
. There are lots of other modules to work on.But, I want to split this in parts (I am not able to do it in one PR, too much!).
Except for
__hash__
method, which has its own PR: #8465