From e3083577b2013525f41fe4442f25c8ee56af212a Mon Sep 17 00:00:00 2001 From: Alfredo Date: Wed, 15 Nov 2023 10:56:01 -0500 Subject: [PATCH] disambiguate duplicate variable name 'node' within inner loop for readability --- api/arrange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/arrange.py b/api/arrange.py index ac5520f..627880a 100644 --- a/api/arrange.py +++ b/api/arrange.py @@ -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: