Skip to content

Commit

Permalink
fix: compare data for equality for json files
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Mar 19, 2021
1 parent 6505cbb commit 298e2e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beet/core/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ def to_str(cls, content: ValueType) -> str:
def from_str(cls, content: str) -> ValueType:
return json.loads(content)

def __eq__(self, other: Any) -> bool:
return type(self) == type(other) and self.data == other.data


class JsonFile(JsonFileBase[JsonDict]):
"""Class representing a json file."""
Expand Down

0 comments on commit 298e2e1

Please sign in to comment.