MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / make_hashable

Function make_hashable

tests/integration/test_parser_goldens.py:84–89  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

82 return ":".join(key_parts)
83
84def make_hashable(val):
85 if isinstance(val, list):
86 return tuple(make_hashable(item) for item in val)
87 if isinstance(val, dict):
88 return tuple(sorted((k, make_hashable(v)) for k, v in val.items()))
89 return val
90
91def normalize_id(val):
92 return repr(make_hashable(val))

Callers 3

normalize_idFunction · 0.85
stable_node_sort_keyFunction · 0.85
load_and_normalizeFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected