Skip to content

Commit

Permalink
Avoid call __hash__ directly in DataDomain __eq__.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbartel authored and aaraney committed May 13, 2024
1 parent 99ad583 commit 5734d93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lib/core/dmod/core/meta_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def merge_domains(cls, d1: DataDomain, d2: DataDomain) -> DataDomain:
discrete_restrictions=new_d_restricts)

def __eq__(self, other):
return isinstance(other, DataDomain) and self.__hash__() == other.__hash__()
return isinstance(other, DataDomain) and hash(self) == hash(other)

def __hash__(self) -> int:
custom_fields = [] if self.custom_data_fields is None else sorted(self.custom_data_fields.items())
Expand Down

0 comments on commit 5734d93

Please sign in to comment.