Closed
Description
Please consider the following code:
from functools import total_ordering
from typing import Any
@total_ordering
class Ord:
def __eq__(self, other: Any) -> bool:
return False
def __lt__(self, other: "Ord") -> bool:
return False
Ord() <= Ord()
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
.