Skip to content

Commit f0d43fb

Browse files
alphaditocarson-katri
authored andcommitted
disambiguate duplicate variable name 'node' within inner loop for readability
1 parent 5cf07a1 commit f0d43fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/arrange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def topo_sort(graph):
2929

3030
column_index = {}
3131
for node in reversed(sorted_nodes):
32-
column_index[node] = max([ column_index[node] for node in graph[node] ], default=-1) + 1
32+
column_index[node] = max([ column_index[adj_node] for adj_node in graph[node] ], default=-1) + 1
3333
if column_index[node] == len(columns):
3434
columns.append([node])
3535
else:

0 commit comments

Comments
 (0)