(caller label, target id tail) for every `calls` edge in one file.
(tmp_path: Path, body: str)
| 11 | |
| 12 | |
| 13 | def _calls(tmp_path: Path, body: str) -> set[tuple[str, str]]: |
| 14 | """(caller label, target id tail) for every `calls` edge in one file.""" |
| 15 | path = tmp_path / "probe.py" |
| 16 | path.write_text(HANDLER + body, encoding="utf-8") |
| 17 | result = extract_python(path) |
| 18 | labels = {n["id"]: n["label"] for n in result["nodes"]} |
| 19 | return { |
| 20 | (labels[e["source"]], e["target"].split("probe_", 1)[1]) |
| 21 | for e in result["edges"] if e["relation"] == "calls" |
| 22 | } |
| 23 | |
| 24 | |
| 25 | # 1. The bug: none of these may link to the module function. |
no test coverage detected