MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / fallback_key

Function fallback_key

graphify/callflow_html.py:1042–1051  ·  view source on GitHub ↗
(node: dict)

Source from the content-addressed store, hash-verified

1040 return selected
1041
1042 def fallback_key(node: dict) -> tuple:
1043 nid = node.get("id", "")
1044 kind_penalty = 1 if node_kind(node) == "concept" else 0
1045 return (
1046 kind_penalty,
1047 -scores.get(nid, 0),
1048 -node_importance(node),
1049 safe_file_path(node.get("source_file", "")),
1050 humanize_label(node.get("label", nid)),
1051 )
1052
1053 for node in sorted(nodes, key=fallback_key):
1054 nid = node.get("id")

Callers

nothing calls this directly

Calls 5

node_kindFunction · 0.85
node_importanceFunction · 0.85
safe_file_pathFunction · 0.85
humanize_labelFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected