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

Function _edge_labels

tests/test_multilang.py:35–44  ·  view source on GitHub ↗
(result, relation, context=None)

Source from the content-addressed store, hash-verified

33
34
35def _edge_labels(result, relation, context=None):
36 labels = {n["id"]: _normalize_symbol_label(n["label"]) for n in result["nodes"]}
37 pairs = set()
38 for e in result["edges"]:
39 if e.get("relation") != relation:
40 continue
41 if context is not None and e.get("context") != context:
42 continue
43 pairs.add((labels.get(e["source"], e["source"]), labels.get(e["target"], e["target"])))
44 return pairs
45
46
47# ── TypeScript ────────────────────────────────────────────────────────────────

Calls 2

_normalize_symbol_labelFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected