Add plugin to typecheck functools.total_ordering#7848
Closed
aecay wants to merge 6 commits intopython:masterfrom
Closed
Add plugin to typecheck functools.total_ordering#7848aecay wants to merge 6 commits intopython:masterfrom
aecay wants to merge 6 commits intopython:masterfrom
Conversation
Now that we consider inherited methods from superclasses, a class will never fail typechecking for lack of __eq__ (which is inherited from object). However, this method is unlikely to provide the correct semantics.
Collaborator
|
I'm going to review this, but also note that it will need a rebase on top of #7829 |
Member
|
@msullivan Note there is a competing PR #7831 that is 1 day older. I am not sure what to do, but it looks like we will need to close one in favor of another, or maybe somehow combine best parts of both. Up to you. |
Collaborator
|
Closing this because the author felt it was a worse base to work from than #7831. (Which I will probably also close.) Feel free to pick it back up though. |
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.
This PR adds a plugin to typecheck classes decorated with
functools.total_ordering, as requested in #4610 .@total_ordering(that the class must define__eq__and one other dunder inequality methods)