mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Skip attributes with leading underscore in Object.__eq__
This commit is contained in:
parent
20c6b959d5
commit
57a4897470
@ -88,6 +88,9 @@ class Object:
|
||||
def __eq__(self, other: "Object") -> bool:
|
||||
for attr in self.__dict__:
|
||||
try:
|
||||
if attr.startswith("_"):
|
||||
continue
|
||||
|
||||
if getattr(self, attr) != getattr(other, attr):
|
||||
return False
|
||||
except AttributeError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user