Skip to content

Commit

Permalink
Add type hint
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
  • Loading branch information
jakelishman and mtreinish committed Sep 21, 2023
1 parent 4913f11 commit e6acceb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions qiskit/circuit/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
Parameter Class for variable parameters.
"""

from uuid import uuid4
from __future__ import annotations

from uuid import uuid4, UUID

from qiskit.circuit.exceptions import CircuitError
from qiskit.utils import optionals as _optionals
Expand Down Expand Up @@ -56,7 +58,9 @@ class Parameter(ParameterExpression):
# `_parameter_symbols` dictionary we need to pass to it before we're entirely initialised
# anyway, because `ParameterExpression` depends heavily on the structure of `Parameter`.

def __init__(self, name: str, *, uuid=None): # pylint: disable=super-init-not-called
def __init__(
self, name: str, *, uuid: UUID | None = None
): # pylint: disable=super-init-not-called
"""Create a new named :class:`Parameter`.
Args:
Expand Down

0 comments on commit e6acceb

Please sign in to comment.