Closed
Description
It would be nice if there was a way to enforce a constraint on __eq__
-- maybe a warning? I almost never want to do the following
def test_operator(): # type: () -> None
1 == "1"
# produces no complaints
While that check may make sense in a world of vanilla python, I'd argue it doesn't make much sense within mypy's world (especially if the arguments are explicitly typed as different types; i.e., one is not a subtype of the other).