MCPcopy Index your code
hub / github.com/treeverse/dvc / _diff

Function _diff

dvc/utils/diff.py:59–70  ·  view source on GitHub ↗
(old_raw, new_raw, with_unchanged)

Source from the content-addressed store, hash-verified

57
58
59def _diff(old_raw, new_raw, with_unchanged):
60 old = _parse(old_raw)
61 new = _parse(new_raw)
62
63 if isinstance(new, dict) or isinstance(old, dict):
64 return _diff_dicts(old, new, with_unchanged)
65
66 val_diff = _diff_vals(old, new, with_unchanged)
67 if val_diff:
68 return {"": val_diff}
69
70 return {}
71
72
73def diff(old, new, with_unchanged=False):

Callers 1

diffFunction · 0.70

Calls 3

_parseFunction · 0.85
_diff_dictsFunction · 0.85
_diff_valsFunction · 0.85

Tested by

no test coverage detected