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

Function _add_node

graphify/extract.py:6376–6385  ·  view source on GitHub ↗
(nid: str, label: str, line: int)

Source from the content-addressed store, hash-verified

6374 seen_ids: set[str] = {n["id"] for n in nodes}
6375
6376 def _add_node(nid: str, label: str, line: int) -> None:
6377 if nid not in seen_ids:
6378 seen_ids.add(nid)
6379 nodes.append({
6380 "id": nid,
6381 "label": label,
6382 "file_type": "code",
6383 "source_file": str_path,
6384 "source_location": f"L{line}",
6385 })
6386
6387 def _add_edge(src: str, tgt: str, relation: str, line: int,
6388 confidence: str = "EXTRACTED") -> None:

Callers 4

_extract_spock_fallbackFunction · 0.70
walkFunction · 0.70
_extract_pascal_regexFunction · 0.70
extract_terraformFunction · 0.70

Calls 1

_make_idFunction · 0.90

Tested by

no test coverage detected