Skip to content

Commit 0bc1b34

Browse files
authored
Refactor imports and update docstring format
1 parent 9680725 commit 0bc1b34

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • qiskit/transpiler/passes/analysis

qiskit/transpiler/passes/analysis/size.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
# Any modifications or derivative works of this code must retain this
1010
# copyright notice, and modified files need to carry a notice indicating
1111
# that they have been altered from the originals.
12-
1312
"""Calculate the size of a DAG circuit."""
13+
from typing import TYPE_CHECKING
1414

15-
from __future__ import annotations
15+
if TYPE_CHECKING:
16+
from qiskit.dagcircuit import DAGCircuit
1617

17-
from qiskit.dagcircuit import DAGCircuit
1818
from qiskit.transpiler.basepasses import AnalysisPass
1919

2020

@@ -35,5 +35,5 @@ def __init__(self, *, recurse: bool = False) -> None:
3535
self.recurse = recurse
3636

3737
def run(self, dag: DAGCircuit) -> None:
38-
"""Run the Size pass on *dag*."""
38+
"""Run the Size pass on ``dag``."""
3939
self.property_set["size"] = dag.size(recurse=self.recurse)

0 commit comments

Comments
 (0)