disambiguate duplicate variable name 'node' within inner loop for readability

This commit is contained in:
Alfredo 2023-11-15 10:56:01 -05:00 • committed by Carson Katri
commit f0d43fb92d

View file

@ -29,7 +29,7 @@ def _arrange(node_tree, padding: typing.Tuple[float, float] = (50, 25)):
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: