From bb0d58020ccd12c9b1294f4f1c03cc25144f7fe9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 1 Jun 2023 13:12:15 -0700 Subject: [PATCH] use in-edges --- aider/repomap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/repomap.py b/aider/repomap.py index 5300058c7..a38ad58f7 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -358,9 +358,9 @@ def call_map(): ranked_definitions = defaultdict(float) for src in G.nodes: src_rank = ranked[src] - total_weight = sum(data["weight"] for _src, _dst, data in G.out_edges(src, data=True)) + total_weight = sum(data["weight"] for _src, _dst, data in G.in_edges(src, data=True)) dump(src, src_rank, total_weight) - for src, dst, data in G.out_edges(src, data=True): + for src, dst, data in G.in_edges(src, data=True): data["rank"] = data["weight"] / total_weight * src_rank ident = data["ident"] ranked_definitions[(dst, ident)] += data["rank"]