Skip to content

Commit

Permalink
add types to InstrumentModule
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Apr 30, 2024
1 parent 00111c7 commit 1972632
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/qcodes/instrument/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
from .instrument_base import InstrumentBase

if TYPE_CHECKING:
from typing_extensions import Unpack

from .instrument import Instrument
from .instrument_base import InstrumentBaseKWArgs


class InstrumentModule(InstrumentBase):
Expand All @@ -33,15 +36,14 @@ class InstrumentModule(InstrumentBase):
Args:
parent: The instrument to which this module should be
attached.
name: The name of this module.
**kwargs: Forwarded to the base class.
"""

def __init__(self,
parent: InstrumentBase,
name: str,
**kwargs: Any) -> None:
def __init__(
self, parent: InstrumentBase, name: str, **kwargs: Unpack[InstrumentBaseKWArgs]
) -> None:
# need to specify parent before `super().__init__` so that the right
# `full_name` is available in that scope. `full_name` is used for
# registering the filter for the log messages. It is composed by
Expand Down

0 comments on commit 1972632

Please sign in to comment.