We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b27f24c commit 57c59e5Copy full SHA for 57c59e5
datajoint/dependencies.py
@@ -56,11 +56,11 @@ def topo_sort(graph):
56
pos -= 1
57
else:
58
placed.add(part)
59
- j = sorted_nodes.index(master)
60
- if pos > j + 1:
61
- # move the part to its master
+ insert_pos = sorted_nodes.index(master) + 1
+ if pos > insert_pos:
+ # move the part to the position immediately after its master
62
del sorted_nodes[pos]
63
- sorted_nodes.insert(j + 1, part)
+ sorted_nodes.insert(insert_pos, part)
64
65
return sorted_nodes
66
0 commit comments