Skip to content

Commit

Permalink
👔 Handle import time case for __eq__
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav-Kumbhat <[email protected]>
  • Loading branch information
gkumbhat committed Aug 12, 2022
1 parent e94db07 commit 192f78e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion import_tracker/lazy_import_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,10 @@ def __delete__(self, *_, **__):
def __delitem__(self, *_, **__):
self._raise()

def __eq__(self, *_, **__):
def __eq__(self, other, *_, **__):
if not _is_import_time():
self._raise()
return id(self) == id(other)

def __float__(self, *_, **__):
self._raise()
Expand Down

0 comments on commit 192f78e

Please sign in to comment.