Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pyqasm/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be left as is, see the other methods

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree, see for example _visit_include specifically for use of Pragma; to my understanding for this file we are dropping the qasm3_ast in docstrings.

@ryanhill1 ryanhill1 Aug 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree with @micpap25, the qasm3_ast prefix does not belong in the doc-string, because in the sphinx build it will be rendered as-is without the alias substitution. It should either be just Pragma, or it should be the full import path.

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):
Expand Down
Loading