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

Function add_node

graphify/extractors/bash.py:359–364  ·  view source on GitHub ↗
(nid: str, label: str, line: int, kind: str = "code")

Source from the content-addressed store, hash-verified

357 return row + 1 + line_offset
358
359 def add_node(nid: str, label: str, line: int, kind: str = "code") -> None:
360 if nid and nid not in seen_ids:
361 seen_ids.add(nid)
362 nodes.append({"id": nid, "label": label, "file_type": "code",
363 "source_file": str_path, "source_location": f"L{line}",
364 "metadata": sanitize_metadata({"language": "bash", "kind": kind})}) # noqa: E501
365
366 def add_edge(src: str, tgt: str, relation: str, line: int,
367 confidence: str = "EXTRACTED", weight: float = 1.0,

Callers 2

extract_bash_sourceFunction · 0.70
walkFunction · 0.70

Calls 1

sanitize_metadataFunction · 0.90

Tested by

no test coverage detected