Skip to content

Commit

Permalink
disambiguate duplicate variable name 'node' within inner loop for rea…
Browse files Browse the repository at this point in the history
…dability
  • Loading branch information
alphadito committed Nov 15, 2023
1 parent 1c641c7 commit e308357
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/arrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def topo_sort(graph):

column_index = {}
for node in reversed(sorted_nodes):
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
if column_index[node] == len(columns):
columns.append([node])
else:
Expand Down

0 comments on commit e308357

Please sign in to comment.