Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
727dd46
Fix isinstance validator logic order
jenshnielsen Aug 19, 2026
fb1e73e
Add ty type checker configuration
jenshnielsen Aug 19, 2026
58d5f50
Dispatch Parameter.get_raw/set_raw instead of overwriting them
jenshnielsen Aug 19, 2026
374aad0
Default TParameter to Parameter[Any, Any]
jenshnielsen Aug 19, 2026
c902b76
Reject legacy setpoint arrays without an array_id
jenshnielsen Aug 19, 2026
5b3ad02
Replace the CombinedParameter lambda hack with a dataclass
jenshnielsen Aug 20, 2026
7bc13c7
Suppress ty false positive on forwarded parameter kwargs
jenshnielsen Aug 20, 2026
f5f9c2d
Correct the description of the ty kwargs false positive
jenshnielsen Aug 20, 2026
6af3900
Use cast for the narrowing in the Infiniium driver
jenshnielsen Aug 21, 2026
c09c9b2
Fix element typing of standalone result dicts
jenshnielsen Aug 21, 2026
6164959
Do not assume a ctypes errcheck callable has a __name__
jenshnielsen Aug 21, 2026
5ac26ba
Suppress ty on the colorbar _inside workaround
jenshnielsen Aug 21, 2026
f4dfaf3
Suppress ty on the qcodes_abstractmethod marker
jenshnielsen Aug 21, 2026
2230a9e
Annotate the DynaCool server socket dictionary
jenshnielsen Aug 21, 2026
e4b8746
Annotate the Keithley 7510 buffer data dictionary
jenshnielsen Aug 21, 2026
d744f98
Narrow the numpy int and float type tuples
jenshnielsen Aug 21, 2026
8dd6644
Suppress ty on the ParamSpec._from_dict override
jenshnielsen Aug 21, 2026
b07aafd
Suppress ty on the IPToVisa base class conflict
jenshnielsen Aug 21, 2026
16423fa
Suppress ty on the Alazar get_idn override
jenshnielsen Aug 21, 2026
375c7dd
Match the parameter name of the AWG5014 __getattr__
jenshnielsen Aug 21, 2026
626ef94
Suppress ty on Parameter.increment
jenshnielsen Aug 21, 2026
520382d
Suppress ty on the Lakeshore CHANNEL_CLASS default
jenshnielsen Aug 21, 2026
25ee53e
Suppress ty on the cache update monkeypatch
jenshnielsen Aug 21, 2026
ccfe8f9
Suppress a ty narrowing imprecision in get_chain_links_of_type
jenshnielsen Aug 21, 2026
c6c5c84
Suppress ty on the run overview extra columns
jenshnielsen Aug 21, 2026
f4fe7b3
Type the AutoLoadableChannelList multichan_paramclass
jenshnielsen Aug 21, 2026
3b4a301
Suppress ty on the ChannelList setitem narrowing
jenshnielsen Aug 21, 2026
27cb6aa
Annotate the second Command exec mapping
jenshnielsen Aug 21, 2026
921c7ff
Register the float sqlite adapter separately from numpy floats
jenshnielsen Aug 21, 2026
367be7f
Suppress the get_ramp_values mismatch newly reported by ty 0.0.74
jenshnielsen Aug 24, 2026
1e4bf7f
Add drafts for the two remaining ty issues
jenshnielsen Aug 24, 2026
420730c
Document how mypy and ty suppression codes interact
jenshnielsen Aug 24, 2026
bca4437
Document how pyright reads suppression comments
jenshnielsen Aug 24, 2026
d5a5e95
Annotate the json exporter templates
jenshnielsen Aug 24, 2026
6ab1c9f
Allow subscribe callbacks to take callback_kwargs
jenshnielsen Aug 24, 2026
e7ca765
Type the 34980A module dict as its submodules
jenshnielsen Aug 24, 2026
7c584ec
Correct the return type of parse_awg_file
jenshnielsen Aug 24, 2026
4fe3557
Do not assume every parameter has a label in the AWG5014C notebook
jenshnielsen Aug 24, 2026
0681891
Check the example notebooks with ty
jenshnielsen Aug 25, 2026
8b21230
Use the enum keys for the B1500 module dicts
jenshnielsen Aug 25, 2026
64fa4dc
Enable the channels before B1500 phase compensation
jenshnielsen Aug 25, 2026
ebeddfb
Declare the dynamic attributes of the E4980A measurement pair
jenshnielsen Aug 25, 2026
8e99dc1
Pack the SR86x example waveforms in lists
jenshnielsen Aug 25, 2026
a885183
Accept any iterable of paths in the B220X switch matrix
jenshnielsen Aug 25, 2026
416ca15
Accept any collection of paths in the 34980A switch matrix
jenshnielsen Aug 25, 2026
016f776
Do not take the length of Line2D.get_ydata in the Lakeshore examples
jenshnielsen Aug 25, 2026
0fbb588
Handle the optional values in the offline plotting tutorial
jenshnielsen Aug 25, 2026
03e371c
Put snapshot_raw on the dataset protocol
jenshnielsen Aug 25, 2026
d9f89ed
Check the optional snapshots in the snapshots notebook
jenshnielsen Aug 25, 2026
2c96522
Use type safe dataset unpacking
jenshnielsen Aug 27, 2026
aa2842b
Fix type checking in notebook
jenshnielsen Aug 27, 2026
7446be3
Allow ParamSpecBase in get_parameter_data
jenshnielsen Aug 27, 2026
a28bf25
Fix type checking in config notebook
jenshnielsen Aug 27, 2026
dba14c0
Fix another notebook
jenshnielsen Aug 27, 2026
09b5ade
Fix type checking in parameter notebook
jenshnielsen Aug 27, 2026
c01366f
Fix type checking in parameter notebook
jenshnielsen Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/changes/newsfragments/8360.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:class:`.Parameter` no longer replaces its own ``get_raw``/``set_raw`` methods
with the implementation generated from ``get_cmd``/``set_cmd``. The generated
implementation is stored on the parameter instead, and ``get_raw``/``set_raw``
are now regular methods that dispatch to it. Assigning over the methods made
static type checkers infer ``get_raw``/``set_raw`` to be instance attributes of
:class:`.Parameter`, which in turn made every subclass implementing them as
regular methods an invalid override. There is no change in behaviour; note only
that ``parameter.get_raw`` is now always a bound method rather than, depending
on the arguments, a ``Command`` instance.
9 changes: 9 additions & 0 deletions docs/changes/newsfragments/8361.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The ``TParameter`` type variable used by :meth:`.InstrumentBase.add_parameter`
now defaults to ``Parameter[Any, Any]`` rather than to a bare ``Parameter``.
When ``add_parameter`` is called without an explicit ``parameter_class`` the
returned parameter is bound to the instrument it is added to, so the previous
default (which expands to ``Parameter[Any, InstrumentBase | None]``) wrongly
claimed that the instrument was ``InstrumentBase | None``. This made the result
unassignable to the ``Parameter[SomeType, Self]`` annotations that drivers use.
Code that relies on the inferred type of an unannotated
``instrument.add_parameter("name")`` will now see ``Parameter[Any, Any]``.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8362.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The legacy dataset importer now raises a clear :class:`ValueError` when a
setpoint array has no ``array_id``, instead of passing ``None`` on to
``add_result`` where a parameter name is expected. This was found by annotating
``DataArray`` in ``qcodes_loop``, which also removes the need for a ``pyright``
suppression on the array shape.
4 changes: 4 additions & 0 deletions docs/changes/newsfragments/8364.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``CombinedParameter.parameter`` is now a small dataclass holding the ``name``,
``full_name``, ``label`` and ``unit`` of the combined parameter, replacing a
lambda that had those attributes attached to it. It remains callable, and
calling it returns ``None`` as before.
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/8365.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Subclasses of ``ParameterBase`` that forward ``**kwargs`` on to their super
class now carry a ``ty: ignore[invalid-argument-type]``. When a generic TypedDict
declares a PEP 696 default for a type parameter, ty computes the upper bound of
the synthesized ``Self`` as the default specialization, so every other
specialization is rejected by the members that bind ``Self``, including expanding
with ``**``. The reason is documented on ``ParameterBaseKWArgs``.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8366.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Infiniium driver now uses ``cast`` where it narrows ``root_instrument`` and
``instrument`` to the concrete driver classes, and where ``pyvisa`` types the
return of ``read_binary_values``/``query_binary_values`` as a ``Sequence[float]``
regardless of the requested ``container``. This replaces five type checker
suppressions and has no effect at runtime.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8367.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``DataSet._finalize_res_dict_standalones`` now appends to its result list
directly instead of building intermediate lists. The intermediate lists took
their element type from the branch that built them rather than from the
declaration, and ``dict`` is invariant in its value type, so the result was not
assignable back. There is no change in behaviour.
4 changes: 4 additions & 0 deletions docs/changes/newsfragments/8368.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The Alazar DLL wrapper no longer assumes that the callable handed to a ctypes
``errcheck`` has a ``__name__``, which a plain ``Callable`` does not guarantee.
The error message falls back to the repr of the callable instead. This only
affects the text of an error that should not occur in practice.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8370.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``numpy_ints`` and ``numpy_floats`` in ``qcodes.utils.types`` are now annotated
as tuples of ``type[np.integer]`` and ``type[np.floating]`` rather than of bare
``type``. As a consequence ``_adapt_float``, which is registered as a sqlite
adapter for the numpy float types as well as for ``float``, now declares that it
accepts ``np.floating`` too. Its behaviour is unchanged.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8371.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The ``__getattr__`` that provides backwards-compatible access to the old flat
parameter names on the Tektronix AWG5014 now names its parameter ``key``,
matching ``DelegateAttributes.__getattr__`` which it overrides and delegates to.
Python only ever calls ``__getattr__`` positionally, so this has no effect at
runtime.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8373.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``json_template_linear`` and ``json_template_heatmap`` in
``qcodes.dataset.json_exporter`` are now annotated as ``dict[str, Any]``. They
are templates for a JSON document, so their values are deliberately
heterogeneous, and without the annotation the inferred value type made indexing
into them an error for callers filling the template in.
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/8374.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The ``callback`` argument of :meth:`.DataSet.subscribe` is now typed as
``Callable[..., None]``. The previous annotation described a callback taking
exactly three arguments, which contradicted ``callback_kwargs``: those are bound
onto the callback with ``functools.partial``, so a callback using them takes
further arguments. ``_Subscriber``, which ``subscribe`` forwards to, already
typed it this way.
7 changes: 7 additions & 0 deletions docs/changes/newsfragments/8375.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``Keysight34980A.module`` is now a ``dict`` of
``Keysight34980ASwitchMatrixSubModule`` rather than one built with
``dict.fromkeys``, whose values were typed as possibly ``None``. ``scan_slots``
puts an entry in for every slot, either the driver for the installed module or a
generic submodule, so the values were never ``None`` once the instrument was
constructed. Code using ``instrument.module[slot]`` no longer has to account for
a ``None`` that cannot occur.
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/8376.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The return type of :func:`.parse_awg_file` has been corrected. The waveform and
marker entries were declared as lists of dicts, but the parser returns the arrays
from inside those dicts, and the loop counts and sequencing values were declared
as possibly ``str`` when they are always ``int``. The type now matches the call
signature of :meth:`.TektronixAWG5014.make_send_and_load_awg_file`, which the
docstring already promised and which is how the function is meant to be used.
3 changes: 3 additions & 0 deletions docs/changes/newsfragments/8377.underthehood
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
``ty`` now also type checks the example notebooks in ``docs``. Unlike mypy and
pyright it understands Jupyter notebooks, so this is coverage that the other two
checkers do not provide.
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/8381.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The Keysight B1500 example notebook called
``b1500.run_iv_staircase_sweep.measurement_status()`` in the phase compensation
section. ``IVSweepMeasurement`` has no such method, so the cell raised
``AttributeError``. The surrounding text asks for all channel outputs to be
enabled before performing phase compensation, so the cell now calls
``b1500.enable_channels()``.
7 changes: 7 additions & 0 deletions docs/changes/newsfragments/8382.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``KeysightE4980AMeasurementPair`` now declares a ``__getattr__`` for type
checkers. The two measured values are exposed as attributes named after the
``names`` of the measurement function, for example ``capacitance`` for ``CPD``
and ``inductance`` for ``LPD``, so which attributes exist is only known at
runtime. The declaration lets this documented usage be written in typed code. It
is not defined at runtime, so accessing an attribute that the current
measurement function does not provide still raises the usual ``AttributeError``.
4 changes: 4 additions & 0 deletions docs/changes/newsfragments/8384.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The Stanford SR86x buffered readout example notebook now packs the waveforms for
:meth:`.TektronixAWG70000Base.makeSEQXFile` in lists rather than wrapping them in
further numpy arrays, which is the shape the method documents. The two forms
behave the same at runtime.
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/8385.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
``connect_paths``, ``disconnect_paths`` and ``to_channel_list`` on the Keysight
B220X switch matrix drivers now accept any iterable of paths rather than only a
``Sequence``. They iterate the paths once and do not index them, so passing a
set, as the example notebook does, is fine. Note that the order in which the
paths appear in the channel list then follows the iteration order of the
argument.
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/8386.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The path arguments of ``connect_paths``, ``disconnect_paths``, ``are_closed``,
``are_open`` and ``to_channel_list`` on the Keysight 34980A switch matrix
submodules are now typed as a ``Collection`` rather than a ``list``, so a set or
a tuple of paths is accepted as well. A ``Collection`` rather than an
``Iterable`` because these methods walk the paths twice, once to validate them
and once to build the channel list, which a one shot iterator would not survive.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8387.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The live temperature plot helper in the two Lakeshore example notebooks keeps
the appended y data in a local variable instead of reading it back with
``Line2D.get_ydata``. The return of ``get_ydata`` is typed as ``ArrayLike``,
which is not necessarily sized, so taking its length was a type error. This also
avoids reading the data back from the line on every iteration.
3 changes: 3 additions & 0 deletions docs/changes/newsfragments/8389.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The offline plotting tutorial now checks the optional values it gets back from
:func:`.plot_dataset` before using them, and asks for the root figure when
saving. ``Axes.figure`` may be a ``SubFigure``, which has no ``savefig``.
5 changes: 5 additions & 0 deletions docs/changes/newsfragments/8390.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``snapshot_raw`` is now part of :class:`.DataSetProtocol` and is available on
:class:`.DataSetInMem` as well as on :class:`.DataSet`. It is documented as the
way to get the snapshot of a run as a JSON string, and is used as such in the
example notebooks, but it was only declared on one of the two dataset classes,
so reading it from a dataset returned by a measurement did not type check.
3 changes: 3 additions & 0 deletions docs/changes/newsfragments/8391.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The snapshot example notebook now checks that the snapshots it reads back from
the datasets are present before using them. A run only has a snapshot if one was
recorded, so both ``snapshot`` and ``snapshot_raw`` are optional.
24 changes: 2 additions & 22 deletions docs/examples/DataSet/Accessing-data-in-DataSet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -710,26 +710,6 @@
"dataset.get_parameters()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'x,t,y,y2,q'"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dataset.parameters"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -1047,7 +1027,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "qcodes",
"language": "python",
"name": "python3"
},
Expand All @@ -1061,7 +1041,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
"version": "3.14.7"
},
"toc": {
"base_numbering": 1,
Expand Down
18 changes: 12 additions & 6 deletions docs/examples/DataSet/Offline Plotting Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@
"outputs": [],
"source": [
"colorbar = colorbars[0]\n",
"# 2D plots have a colorbar, 1D plots do not, so the entries are optional\n",
"assert colorbar is not None\n",
"colorbar.set_label(\"Correct science label\")"
]
},
Expand Down Expand Up @@ -939,9 +941,11 @@
"source": [
"%%time\n",
"axeslist, _ = plot_dataset(dataset)\n",
"axeslist[0].figure.savefig(\n",
" Path.cwd().parent / \"example_output\" / f\"test_plot_dataset_{dataid}.pdf\"\n",
")"
"# Axes.figure may be a SubFigure, which cannot be saved, so ask for the\n",
"# root figure\n",
"figure = axeslist[0].get_figure(root=True)\n",
"assert figure is not None\n",
"figure.savefig(Path.cwd().parent / \"example_output\" / f\"test_plot_dataset_{dataid}.pdf\")"
]
},
{
Expand Down Expand Up @@ -971,9 +975,11 @@
"source": [
"%%time\n",
"axeslist, _ = plot_dataset(dataset, rasterized=False)\n",
"axeslist[0].figure.savefig(\n",
" Path.cwd().parent / \"example_output\" / f\"test_plot_dataset_{dataid}.pdf\"\n",
")"
"# Axes.figure may be a SubFigure, which cannot be saved, so ask for the\n",
"# root figure\n",
"figure = axeslist[0].get_figure(root=True)\n",
"assert figure is not None\n",
"figure.savefig(Path.cwd().parent / \"example_output\" / f\"test_plot_dataset_{dataid}.pdf\")"
]
}
],
Expand Down
13 changes: 12 additions & 1 deletion docs/examples/DataSet/Threaded data acquisition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "2add302b",
"metadata": {
"ExecuteTime": {
Expand All @@ -115,6 +115,17 @@
" time.sleep(0.1)\n",
" return val\n",
"\n",
" @property\n",
" def root_instrument(self) -> \"DummyInstrumentWithMeasurement\":\n",
" if self.instrument is None or not isinstance(\n",
" self.instrument.root_instrument, DummyInstrumentWithMeasurement\n",
" ):\n",
" raise ValueError(\n",
" \"SleepyDmmExponentialParameter must be bound to a DummyInstrumentWithMeasurement\"\n",
" )\n",
" instr = self.instrument.root_instrument\n",
" return instr\n",
"\n",
" @staticmethod\n",
" def _exponential_decay(a: float, b: float):\n",
" x = 0\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1451,7 +1451,15 @@
}
],
"source": [
"result = dond(sweep_1, sweep_2, [dmm.v1], [dmm.v2], do_plot=True, show_progress=True)"
"result = dond(\n",
" sweep_1,\n",
" sweep_2,\n",
" [dmm.v1],\n",
" [dmm.v2],\n",
" do_plot=True,\n",
" show_progress=True,\n",
" squeeze=False,\n",
")"
]
},
{
Expand Down Expand Up @@ -1979,7 +1987,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "qcodes",
"language": "python",
"name": "python3"
},
Expand All @@ -1993,7 +2001,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.14.7"
},
"toc": {
"base_numbering": 1,
Expand Down
12 changes: 9 additions & 3 deletions docs/examples/DataSet/Working with snapshots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,9 @@
"metadata": {},
"outputs": [],
"source": [
"snapshot_of_run = dataset.snapshot"
"snapshot_of_run = dataset.snapshot\n",
"# a run only has a snapshot if one was recorded, this one has\n",
"assert snapshot_of_run is not None"
]
},
{
Expand All @@ -602,7 +604,8 @@
"metadata": {},
"outputs": [],
"source": [
"snapshot_of_run_in_json_format = dataset.snapshot_raw"
"snapshot_of_run_in_json_format = dataset.snapshot_raw\n",
"assert snapshot_of_run_in_json_format is not None"
]
},
{
Expand Down Expand Up @@ -881,7 +884,10 @@
"metadata": {},
"outputs": [],
"source": [
"diff_param_values(dataset.snapshot, bad_dataset.snapshot).changed"
"snapshot_of_bad_run = bad_dataset.snapshot\n",
"assert snapshot_of_bad_run is not None\n",
"\n",
"diff_param_values(snapshot_of_run, snapshot_of_bad_run).changed"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -108,6 +108,18 @@
" npoints = self.root_instrument.sweep_n_points.get_latest()\n",
" return np.random.default_rng().random(npoints)\n",
"\n",
" @property\n",
" def root_instrument(self) -> \"DummyBufferedDMM\":\n",
" # we override this to enforce that the root instrument is a DummyBufferedDMM\n",
" # to ensure that we can get the value of the n_points parameter\n",
" if self._instrument is None:\n",
" raise ValueError(\"Instrument is not set for this parameter\")\n",
" root_instrument = self._instrument.root_instrument\n",
" if not isinstance(root_instrument, DummyBufferedDMM):\n",
" raise TypeError(\"root_instrument must be an instance of DummyBufferedDMM\")\n",
"\n",
" return root_instrument\n",
"\n",
"\n",
"class DummyBufferedDMM(Instrument):\n",
" def __init__(self, name, **kwargs):\n",
Expand Down Expand Up @@ -655,7 +667,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "qcodes",
"language": "python",
"name": "python3"
},
Expand All @@ -669,7 +681,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.14.7"
},
"toc": {
"base_numbering": 1,
Expand Down
Loading
Loading