Skip to content

Commit 17431f3

Browse files
committed
Yokogawa type safe parent
1 parent 1bdc3ed commit 17431f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/qcodes/instrument_drivers/yokogawa/Yokogawa_GS200.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class YokogawaGS200Exception(Exception):
3838
pass
3939

4040

41-
class YokogawaGS200Monitor(InstrumentChannel):
41+
class YokogawaGS200Monitor(InstrumentChannel["YokogawaGS200"]):
4242
"""
4343
Monitor part of the GS200. This is only enabled if it is
4444
installed in the GS200 (it is an optional extra).
@@ -169,7 +169,7 @@ def state(self) -> int:
169169
def _get_measurement(self) -> float:
170170
if self._unit is None or self._range is None:
171171
raise YokogawaGS200Exception("Measurement module not initialized.")
172-
if self._parent.auto_range.get() or (self._unit == "VOLT" and self._range < 1):
172+
if self.parent.auto_range.get() or (self._unit == "VOLT" and self._range < 1):
173173
# Measurements will not work with autorange, or when
174174
# range is <1V.
175175
self._enabled = False
@@ -207,7 +207,7 @@ def update_measurement_enabled(
207207
self.measure.unit = "V"
208208

209209

210-
class YokogawaGS200Program(InstrumentChannel):
210+
class YokogawaGS200Program(InstrumentChannel["YokogawaGS200"]):
211211
"""
212212
InstrumentModule that holds a Program for the YokoGawa GS200
213213

0 commit comments

Comments
 (0)