Skip to content

Commit

Permalink
improved variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Sep 16, 2024
1 parent b27f24c commit 57c59e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datajoint/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def topo_sort(graph):
pos -= 1
else:
placed.add(part)
j = sorted_nodes.index(master)
if pos > j + 1:
# 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
del sorted_nodes[pos]
sorted_nodes.insert(j + 1, part)
sorted_nodes.insert(insert_pos, part)

return sorted_nodes

Expand Down

0 comments on commit 57c59e5

Please sign in to comment.