| 49 | |
| 50 | @dataclass(frozen=True) |
| 51 | class AffectedHit: |
| 52 | node_id: str |
| 53 | depth: int |
| 54 | via_relation: str |
| 55 | # The traversed edge's location — the actual call/import/reference SITE in |
| 56 | # this node's file, not the node's own definition line (#BUG1). Defaults keep |
| 57 | # existing constructors/tests working; None falls back to the node's def line. |
| 58 | via_file: "str | None" = None |
| 59 | via_location: "str | None" = None |
| 60 | # Every line of the traversed edge in via_file (source_location + also_seen). |
| 61 | via_lines: "tuple[int, ...]" = () |
| 62 | |
| 63 | |
| 64 | def _node_label(graph: nx.Graph, node_id: str) -> str: |