Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit 243f1e7

Browse files
committed
add __eq__ method for :mod:atomx.models.Report
1 parent fa65f20 commit 243f1e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

atomx/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ def __init__(self, session, query, fast, id, lines, error, link,
212212
def __repr__(self):
213213
return "Report(id='{}', is_ready={}, query={})".format(self.id, self.is_ready, self.query)
214214

215+
def __eq__(self, other):
216+
return self.id == getattr(other, 'id', 'INVALID')
217+
215218
@property
216219
def is_ready(self):
217220
"""Returns ``True`` if the :class:`.Report` is ready, ``False`` otherwise."""

0 commit comments

Comments
 (0)