Skip to content

Commit 57c59e5

Browse files
improved variable names
1 parent b27f24c commit 57c59e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

datajoint/dependencies.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ def topo_sort(graph):
5656
pos -= 1
5757
else:
5858
placed.add(part)
59-
j = sorted_nodes.index(master)
60-
if pos > j + 1:
61-
# move the part to its master
59+
insert_pos = sorted_nodes.index(master) + 1
60+
if pos > insert_pos:
61+
# move the part to the position immediately after its master
6262
del sorted_nodes[pos]
63-
sorted_nodes.insert(j + 1, part)
63+
sorted_nodes.insert(insert_pos, part)
6464

6565
return sorted_nodes
6666

0 commit comments

Comments
 (0)