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
deftest_operator(): # type: () -> None1=="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).
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 followingWhile 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).