Minimal node-link graph: one symbol node per {source_file: label}.
(files: dict[str, str])
| 30 | |
| 31 | |
| 32 | def _graph(files: dict[str, str]) -> dict: |
| 33 | """Minimal node-link graph: one symbol node per {source_file: label}.""" |
| 34 | return { |
| 35 | "directed": False, |
| 36 | "nodes": [ |
| 37 | {"id": f"n{i}", "label": label, "source_file": src} |
| 38 | for i, (src, label) in enumerate(sorted(files.items())) |
| 39 | ], |
| 40 | "links": [], |
| 41 | } |
| 42 | |
| 43 | |
| 44 | def _write_graph(tmp_path: Path, graph: dict) -> Path: |
no test coverage detected