Skip to content

Commit 98094b1

Browse files
committed
Typesafe keithley s46
1 parent dd6ec1f commit 98094b1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/qcodes/instrument_drivers/Keithley/Keithley_s46.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from typing import TYPE_CHECKING, Any, ClassVar
88

99
from qcodes.instrument import (
10-
Instrument,
1110
VisaInstrument,
1211
VisaInstrumentKWArgs,
1312
)
@@ -56,7 +55,7 @@ def release(self, channel_number: int) -> None:
5655
self._locked_by = None
5756

5857

59-
class S46Parameter(Parameter):
58+
class S46Parameter(Parameter[ParamRawDataType, "KeithleyS46"]):
6059
"""
6160
A parameter class for S46 channels. We do not use the QCoDeS
6261
InstrumentChannel class because our channel has one state parameter,
@@ -73,7 +72,7 @@ class S46Parameter(Parameter):
7372
def __init__(
7473
self,
7574
name: str,
76-
instrument: Instrument | None,
75+
instrument: "KeithleyS46",
7776
channel_number: int,
7877
lock: KeithleyS46RelayLock,
7978
**kwargs: Any,
@@ -95,7 +94,6 @@ def __init__(
9594
) from e
9695

9796
def _get(self, get_cached: bool) -> str:
98-
assert isinstance(self.instrument, KeithleyS46)
9997
closed_channels = self.instrument.closed_channels.get_latest()
10098

10199
if not get_cached or closed_channels is None:

0 commit comments

Comments
 (0)