diff --git a/src/pyqasm/visitor.py b/src/pyqasm/visitor.py index 62f52fa..cd4a24d 100644 --- a/src/pyqasm/visitor.py +++ b/src/pyqasm/visitor.py @@ -2650,8 +2650,7 @@ def _visit_while_loop(self, statement: qasm3_ast.WhileLoop) -> list[qasm3_ast.St statement (WhileLoop): The while-loop AST node. Returns: - list[Statement]: The list of unrolled statements from the while-loop, or an - empty list if self._check_only is True. + list[Statement]: The list of unrolled statements from the while-loop. Raises: ValidationError: If loop condition is non-classical or dynamic. @@ -3047,9 +3046,10 @@ def _visit_pragma(self, statement: qasm3_ast.Pragma) -> list[qasm3_ast.Pragma]: still copied to the output, where the consumer applies it to whatever comes next. Args: - statement (qasm3_ast.Pragma): The Pragma node to visit. + statement (Pragma): The Pragma node to visit. Returns: - list[qasm3_ast.Pragma]: The pragma, unmodified. + list[Pragma]: The pragma, unmodified, or an empty list + if self._check_only is True. """ logger.debug("Visiting pragma '%s'", statement.command) if self._is_verbatim_pragma(statement):