For example, the following code is illegal in Python 3 (implementing __eq__ shadows your __hash__ implementation with None in Python 3)
classFoo(object):
def__init__(self, x):
self.x=xdef__eq__(self, other):
ifnotisinstance(other, Foo):
returnNotImplementedreturnself.x==other.xset_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?
For example, the following code is illegal in Python 3 (implementing
__eq__shadows your__hash__implementation withNonein Python 3)Poking around the code, AFAICT
mypydoesn't do anyHashablechecks. I don't see any other Protocols being checked inchecker.py. Is there any existing tickets around supporting Protocols in mypy?