diff --git a/hugr-py/src/hugr/hugr.py b/hugr-py/src/hugr/hugr.py index b4f70050a..619a09955 100644 --- a/hugr-py/src/hugr/hugr.py +++ b/hugr-py/src/hugr/hugr.py @@ -252,7 +252,7 @@ def _node_links(self, node: Node, links: dict[P, K]) -> Iterable[tuple[P, list[K try: direction = next(iter(links.keys())).direction except StopIteration: - return iter(()) + return # iterate over known offsets for offset in range(self.num_ports(node, direction)): port = cast(P, node.port(offset, direction))