Skip to content

Commit df48a89

Browse files
committed
Forward kwrags to Parameter constructor
1 parent 105663d commit df48a89

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/qcodes/instrument/delegate/delegate_instrument.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,15 @@ def _create_and_add_parameters(
144144
path_list = paths
145145
else:
146146
raise ValueError(
147-
"Parameter paths should be either a string "
148-
"or Sequence of strings."
147+
"Parameter paths should be either a string or Sequence of strings."
149148
)
150149
if isinstance(names, str):
151150
name_list: Sequence[str] = [names]
152151
elif isinstance(names, (Sequence, type(None))):
153152
name_list = names
154153
else:
155154
raise ValueError(
156-
"Parameter names should be either a string "
157-
"or Sequence of strings."
155+
"Parameter names should be either a string or Sequence of strings."
158156
)
159157

160158
self._create_and_add_parameter(
@@ -208,6 +206,7 @@ def _create_and_add_parameter(
208206
getter: Callable[..., Any] | None = None,
209207
formatter: Callable[..., Any] | None = None,
210208
unit: str | None = None,
209+
**kwargs: Any,
211210
) -> None:
212211
"""Create delegate parameter that links to a given set of paths
213212
(e.g. my_instrument.my_param) on the station"""
@@ -250,6 +249,7 @@ def _create_and_add_parameter(
250249
source=source_parameters[0],
251250
parameter_class=DelegateParameter,
252251
unit=unit,
252+
**kwargs,
253253
)
254254

255255
def _create_and_add_channels(

0 commit comments

Comments
 (0)