core: Implement Dead.__ne__ & Dead.__hash__

Both these addtions are to address warnings in
https://lgtm.com/projects/g/dw/mitogen/alerts/?mode=list. Namely that if
a class defines an equality method then it should also define an
inequality and a hash method.

Refs #61
wip-fakessh-exit-status
Alex Willmer 7 years ago committed by David Wilson
parent 4b373c421b
commit a1aab30e63

@ -121,9 +121,15 @@ class TimeoutError(Error):
class Dead(object):
def __hash__(self):
return hash(Dead)
def __eq__(self, other):
return type(other) is Dead
def __ne__(self, other):
return type(other) is not Dead
def __reduce__(self):
return (_unpickle_dead, ())

Loading…
Cancel
Save