MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / diff

Method diff

unity_cli/api/uitree_snapshot.py:63–73  ·  view source on GitHub ↗

Compare current tree against a saved snapshot.

(self, name: str, current: dict[str, Any])

Source from the content-addressed store, hash-verified

61 return None
62
63 def diff(self, name: str, current: dict[str, Any]) -> dict[str, Any]:
64 """Compare current tree against a saved snapshot."""
65 baseline = self.load(name)
66 if baseline is None:
67 msg = f"Snapshot not found: {name!r}"
68 raise FileNotFoundError(msg)
69
70 baseline_elements = _collect_elements(baseline)
71 current_elements = _collect_elements(current)
72
73 return _compare_elements(baseline_elements, current_elements)
74
75 def list_names(self) -> list[str]:
76 """List all saved snapshot names."""

Calls 3

loadMethod · 0.95
_collect_elementsFunction · 0.85
_compare_elementsFunction · 0.85