Skip to content

Commit 57a4897

Browse files
committed
Skip attributes with leading underscore in Object.__eq__
1 parent 20c6b95 commit 57a4897

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pyrogram/types/object.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def __repr__(self) -> str:
8888
def __eq__(self, other: "Object") -> bool:
8989
for attr in self.__dict__:
9090
try:
91+
if attr.startswith("_"):
92+
continue
93+
9194
if getattr(self, attr) != getattr(other, attr):
9295
return False
9396
except AttributeError:

0 commit comments

Comments
 (0)