mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
Handle the case where there is no rank flow
This commit is contained in:
parent
91f48dfdf1
commit
12512df707
1 changed files with 4 additions and 1 deletions
|
@ -277,7 +277,10 @@ class RepoMap:
|
||||||
else:
|
else:
|
||||||
pers_args = dict()
|
pers_args = dict()
|
||||||
|
|
||||||
ranked = nx.pagerank(G, weight="weight", **pers_args)
|
try:
|
||||||
|
ranked = nx.pagerank(G, weight="weight", **pers_args)
|
||||||
|
except ZeroDivisionError:
|
||||||
|
return []
|
||||||
|
|
||||||
# top_rank = sorted([(rank, node) for (node, rank) in ranked.items()], reverse=True)
|
# top_rank = sorted([(rank, node) for (node, rank) in ranked.items()], reverse=True)
|
||||||
# Print the PageRank of each node
|
# Print the PageRank of each node
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue