(tmp_path: Path, files: dict[str, str])
| 14 | |
| 15 | |
| 16 | def _calls(tmp_path: Path, files: dict[str, str]): |
| 17 | paths = [] |
| 18 | for name, body in files.items(): |
| 19 | path = tmp_path / name |
| 20 | path.parent.mkdir(parents=True, exist_ok=True) |
| 21 | path.write_text(body, encoding="utf-8") |
| 22 | paths.append(path) |
| 23 | result = extract(paths, cache_root=tmp_path / "graphify-out") |
| 24 | calls = { |
| 25 | (edge["source"], edge["target"]) |
| 26 | for edge in result["edges"] |
| 27 | if edge.get("relation") == "calls" |
| 28 | } |
| 29 | return calls, result |
| 30 | |
| 31 | |
| 32 | def _find(result: dict, label: str, id_contains: str) -> str: |
no test coverage detected