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

Function evolve_recursive

tests/func/test_dataset.py:35–44  ·  view source on GitHub ↗

Recursive attr.evolve() method, where any attr-based attributes will be evolved too.

(inst, **changes)

Source from the content-addressed store, hash-verified

33
34
35def evolve_recursive(inst, **changes):
36 """Recursive attr.evolve() method, where any attr-based attributes
37 will be evolved too.
38 """
39 for key, value in changes.items():
40 v = getattr(inst, key)
41 if has(type(v)) and isinstance(value, dict):
42 value = evolve_recursive(v, **value)
43 changes[key] = value
44 return evolve(inst, **changes)
45
46
47def test_dvc(tmp_dir, scm, dvc: "Repo"):

Callers 3

test_dvcFunction · 0.85
test_datachainFunction · 0.85
test_urlFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected