Use explicit __eq__ call to be consistent with other methods.

This commit is contained in:
Rapptz 2019-04-06 20:18:10 -04:00
parent 7c5a4b67d7
commit 9248ff306c

View File

@ -94,7 +94,7 @@ class PartialEmoji:
return self.id == other.id
def __ne__(self, other):
return not self == other
return not self.__eq__(other)
def __hash__(self):
return hash((self.id, self.name))
@ -208,7 +208,7 @@ class Emoji:
return isinstance(other, (PartialEmoji, Emoji)) and self.id == other.id
def __ne__(self, other):
return not self == other
return not self.__eq__(other)
def __hash__(self):
return self.id >> 22