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

Function _calls

tests/test_pascal_singleton_resolution.py:37–49  ·  view source on GitHub ↗

``(caller file, caller label, callee label, callee file)`` per call edge. Both fixtures declare a ``Run()``, so the caller's file is part of the identity here, not decoration.

(graph: dict)

Source from the content-addressed store, hash-verified

35
36
37def _calls(graph: dict) -> set[tuple[str, str, str, str]]:
38 """``(caller file, caller label, callee label, callee file)`` per call edge.
39
40 Both fixtures declare a ``Run()``, so the caller's file is part of the
41 identity here, not decoration.
42 """
43 labels = {n["id"]: str(n.get("label", "")) for n in graph["nodes"]}
44 files = {n["id"]: Path(str(n.get("source_file", ""))).name for n in graph["nodes"]}
45 return {
46 (files.get(e["source"], ""), labels.get(e["source"], ""),
47 labels.get(e["target"], ""), files.get(e["target"], ""))
48 for e in graph["edges"] if e.get("relation") == "calls"
49 }
50
51
52def test_call_through_a_global_reaches_the_method():

Calls 1

getMethod · 0.45

Tested by

no test coverage detected