Skip to content

Commit

Permalink
fixed ucombo hash
Browse files Browse the repository at this point in the history
sorted returns a (unhashable)  list, so much convert this list to a tuple before hashing.
  • Loading branch information
jagerber48 committed Dec 26, 2024
1 parent 0abc0f6 commit 0086a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uncertainties/ucombo.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __str__(self: UCombo) -> str:
def __hash__(self: UCombo) -> int:
if self._hash is None:
self._hash = hash(

Check warning on line 128 in uncertainties/ucombo.py

View check run for this annotation

Codecov / codecov/patch

uncertainties/ucombo.py#L127-L128

Added lines #L127 - L128 were not covered by tests
sorted(tuple((key, value) for key, value in self.expanded.items()))
tuple(sorted((key, value) for key, value in self.expanded.items()))
)
return self._hash

Check warning on line 131 in uncertainties/ucombo.py

View check run for this annotation

Codecov / codecov/patch

uncertainties/ucombo.py#L131

Added line #L131 was not covered by tests

Expand Down

0 comments on commit 0086a0a

Please sign in to comment.