We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cf07a1 commit f0d43fbCopy full SHA for f0d43fb
api/arrange.py
@@ -29,7 +29,7 @@ def topo_sort(graph):
29
30
column_index = {}
31
for node in reversed(sorted_nodes):
32
- column_index[node] = max([ column_index[node] for node in graph[node] ], default=-1) + 1
+ column_index[node] = max([ column_index[adj_node] for adj_node in graph[node] ], default=-1) + 1
33
if column_index[node] == len(columns):
34
columns.append([node])
35
else:
0 commit comments