Skip to content
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

Merged
merged 6 commits into from
Aug 4, 2022

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Aug 4, 2022

I've removed all duplicates found by python/mypy#13321 from modules starting with _ and a. 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

@AlexWaygood AlexWaygood changed the title Remove duplocate definitions, step 1 Remove duplicate definitions, step 1 Aug 4, 2022
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a 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.

@srittau srittau merged commit a376da8 into python:master Aug 4, 2022
@@ -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: ...
Copy link
Member Author

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.

sobolevn added a commit to sobolevn/typeshed that referenced this pull request Aug 4, 2022
@sobolevn sobolevn mentioned this pull request Aug 4, 2022
srittau pushed a commit that referenced this pull request Aug 4, 2022
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