Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-koch committed Jan 11, 2024
1 parent 20b2d99 commit a14ae45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guppy/hugr/hugr.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,14 +708,14 @@ def insert_order_edges(self) -> "Hugr":
continue

if src.node.parent != tgt.node.parent:
# Walk up the hierarchy from the src until we hit a node at the same
# level as tgt
# Walk up the hierarchy from the tgt until we hit a node at the same
# level as src
node = tgt.node
while node.parent != src.node.parent:
if node.parent is None:
raise ValueError("Invalid non-local edge!")
node = node.parent
# Edge order edge to make sure that the src is executed first
# Add order edge to make sure that the src is executed first
self.add_order_edge(src.node, node)
return self

Expand Down

0 comments on commit a14ae45

Please sign in to comment.