Skip to content

Commit

Permalink
diff: do not recurse when trying to get stats (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Aug 7, 2024
1 parent da8fd8d commit 3b53bd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dvc_data/hashfile/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ def __bool__(self):

@property
def stats(self) -> dict[str, int]:
return {k: len(v) for k, v in asdict(self).items() if k != "unchanged"}
return {
k: len(v)
for k, v in asdict(self, recurse=False).items()
if k != "unchanged"
}


ROOT = ("",)
Expand Down

0 comments on commit 3b53bd2

Please sign in to comment.