(labels: list[str])
| 28 | |
| 29 | |
| 30 | def _graph(labels: list[str]) -> tuple[nx.Graph, dict[int, list[str]]]: |
| 31 | G = nx.Graph() |
| 32 | ids = [] |
| 33 | for i, lab in enumerate(labels): |
| 34 | nid = f"n{i}" |
| 35 | G.add_node(nid, label=lab, file_type="code", source_file="x.py", community=0) |
| 36 | ids.append(nid) |
| 37 | for a, b in zip(ids, ids[1:]): |
| 38 | G.add_edge(a, b, relation="calls", confidence="EXTRACTED") |
| 39 | return G, {0: ids} |
| 40 | |
| 41 | |
| 42 | def _fake_windows(monkeypatch): |
no test coverage detected