Every `calls` edge from a function in source_file to target_file.
(result: dict, source_file: str, target_file: str)
| 29 | |
| 30 | |
| 31 | def _calls(result: dict, source_file: str, target_file: str) -> list[dict]: |
| 32 | """Every `calls` edge from a function in source_file to target_file.""" |
| 33 | nodes = {n["id"]: n for n in result["nodes"]} |
| 34 | return [ |
| 35 | e |
| 36 | for e in result["edges"] |
| 37 | if e["relation"] == "calls" |
| 38 | and nodes[e["source"]].get("source_file") == source_file |
| 39 | and nodes[e["target"]].get("source_file") == target_file |
| 40 | ] |
| 41 | |
| 42 | |
| 43 | MINIMAL = { |
no test coverage detected