mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 08:23:09 +00:00
Use explicit __eq__ call to be consistent with other methods.
This commit is contained in:
@@ -94,7 +94,7 @@ class PartialEmoji:
|
|||||||
return self.id == other.id
|
return self.id == other.id
|
||||||
|
|
||||||
def __ne__(self, other):
|
def __ne__(self, other):
|
||||||
return not self == other
|
return not self.__eq__(other)
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hash((self.id, self.name))
|
return hash((self.id, self.name))
|
||||||
@@ -208,7 +208,7 @@ class Emoji:
|
|||||||
return isinstance(other, (PartialEmoji, Emoji)) and self.id == other.id
|
return isinstance(other, (PartialEmoji, Emoji)) and self.id == other.id
|
||||||
|
|
||||||
def __ne__(self, other):
|
def __ne__(self, other):
|
||||||
return not self == other
|
return not self.__eq__(other)
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return self.id >> 22
|
return self.id >> 22
|
||||||
|
Reference in New Issue
Block a user