Skip to content

Commit

Permalink
hotfix(id_generation): ignore attributes that fail hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
nkemnitz committed Dec 28, 2023
1 parent 7fb1390 commit 0b011ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zetta_utils/mazepa/id_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ def _get_code_hash(
_visited.add(id(fn))

for attribute_name in {x for x in dir(fn) if not x.startswith("__")}:
attrib = getattr(fn, attribute_name)
try:
attrib = getattr(fn, attribute_name)
except AssertionError:

Check warning on line 58 in zetta_utils/mazepa/id_generation.py

View check run for this annotation

Codecov / codecov/patch

zetta_utils/mazepa/id_generation.py#L58

Added line #L58 was not covered by tests
# Might happen before proper initialization
continue

Check warning on line 60 in zetta_utils/mazepa/id_generation.py

View check run for this annotation

Codecov / codecov/patch

zetta_utils/mazepa/id_generation.py#L60

Added line #L60 was not covered by tests
if callable(attrib):
_get_code_hash(attrib, _hash, _visited)
else:
Expand Down

0 comments on commit 0b011ea

Please sign in to comment.