-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 complaintsWhile 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).
andy-hanson