(nid: str, label: str, line: int)
| 38 | seen_ids: set[str] = set() |
| 39 | |
| 40 | def add_node(nid: str, label: str, line: int) -> None: |
| 41 | if nid not in seen_ids: |
| 42 | seen_ids.add(nid) |
| 43 | nodes.append({ |
| 44 | "id": nid, |
| 45 | "label": label, |
| 46 | "file_type": "code", |
| 47 | "source_file": str_path, |
| 48 | "source_location": f"L{line}", |
| 49 | }) |
| 50 | |
| 51 | def add_edge(src: str, tgt: str, relation: str, line: int) -> None: |
| 52 | # Only add edge if both endpoints exist or src is the file node |
no outgoing calls
no test coverage detected