-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
@total_ordering support #4610
Labels
Comments
Perhaps the implementation of this could be a plugin. There are likely ideas to copy from the attrs plugin that David Euresti recently contributed (though that one has a wider scope). |
+1. Just got hit by this one. |
Maybe someone can submit a PR. |
chadrik
added a commit
to chadrik/beam
that referenced
this issue
Oct 27, 2019
…ion") mypy does not have support for @functools.total_ordering: python/mypy#4610
3 tasks
chadrik
added a commit
to chadrik/beam
that referenced
this issue
Jan 31, 2020
…" and "Duration") mypy does not have support for @functools.total_ordering: python/mypy#4610 neither does pytype.
Can the implementation like pantsbuild/pants#9525 be utilized in base mypy? |
@aldanor that seems reasonable, since this is a standard library function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please consider the following code:
mypy 0.560 (using Python 3.6.4, default flags) complains:
test.py:15: error: Unsupported left operand type for <= ("Ord")
It would be helpful if mypy would support
@total_ordering
.The text was updated successfully, but these errors were encountered: