fix BotEnum comparison
This commit is contained in:
@@ -126,7 +126,10 @@ class EnumMember(object):
|
||||
if isinstance(other, str):
|
||||
return self.value == other
|
||||
if isinstance(other, EnumMember):
|
||||
return self.value == other.value and self._parent is other._parent
|
||||
return self.value == other.value and (
|
||||
issubclass(self._parent, other._parent)
|
||||
or issubclass(other._parent, self._parent)
|
||||
)
|
||||
return other.__eq__(self.value)
|
||||
|
||||
def __hash__(self):
|
||||
|
||||
Reference in New Issue
Block a user