mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-21 02:16:41 +00:00
Fix comparisons between two Object with types
This commit is contained in:
parent
61eddfcb18
commit
56916f9241
@ -102,7 +102,7 @@ class Object(Hashable):
|
|||||||
return f'<Object id={self.id!r} type={self.type!r}>'
|
return f'<Object id={self.id!r} type={self.type!r}>'
|
||||||
|
|
||||||
def __eq__(self, other: object) -> bool:
|
def __eq__(self, other: object) -> bool:
|
||||||
if isinstance(other, self.type):
|
if isinstance(other, (self.type, self.__class__)):
|
||||||
return self.id == other.id
|
return self.id == other.id
|
||||||
return NotImplemented
|
return NotImplemented
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user