-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
Description
For example, the following code is illegal in Python 3 (implementing __eq__ shadows your __hash__ implementation with None in Python 3)
class Foo(object):
def __init__(self, x):
self.x = x
def __eq__(self, other):
if not isinstance(other, Foo):
return NotImplemented
return self.x == other.x
set_of_foo = {Foo(1), Foo(2)}Poking around the code, AFAICT mypy doesn't do any Hashable checks. I don't see any other Protocols being checked in checker.py. Is there any existing tickets around supporting Protocols in mypy?
NeilGirdhar, jgillard and finite-state-machine