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

Function _owned_method_nid

tests/test_ruby_resolution.py:72–82  ·  view source on GitHub ↗
(graph: dict, owner_label: str, method_label: str)

Source from the content-addressed store, hash-verified

70
71
72def _owned_method_nid(graph: dict, owner_label: str, method_label: str) -> str:
73 labels = _labels(graph["nodes"])
74 matches = [
75 str(edge["target"])
76 for edge in graph["edges"]
77 if edge.get("relation") == "method"
78 and labels.get(edge.get("source")) == owner_label
79 and labels.get(edge.get("target")) == method_label
80 ]
81 assert len(matches) == 1
82 return matches[0]
83
84
85def _only_call(graph: dict, target_label: str = ".helper()") -> dict:

Calls 2

_labelsFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected