Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
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?
NeilGirdhar, jgillard and finite-state-machine