@@ -245,7 +245,9 @@ def _set_manual_parameter(
245
245
** kwargs ,
246
246
)
247
247
248
- no_instrument_get = not self .gettable and (get_cmd is None or get_cmd is False )
248
+ no_instrument_get = not self ._implements_get_raw and (
249
+ get_cmd is None or get_cmd is False
250
+ )
249
251
# TODO: a matching check should be in ParameterBase but
250
252
# due to the current limited design the ParameterBase cannot
251
253
# know if this subclass will supply a get_cmd
@@ -261,13 +263,13 @@ def _set_manual_parameter(
261
263
# in the scope of this class.
262
264
# (previous call to `super().__init__` wraps existing
263
265
# get_raw/set_raw into get/set methods)
264
- if self .gettable and get_cmd not in (None , False ):
266
+ if self ._implements_get_raw and get_cmd not in (None , False ):
265
267
raise TypeError (
266
268
"Supplying a not None or False `get_cmd` to a Parameter"
267
269
" that already implements"
268
270
" get_raw is an error."
269
271
)
270
- elif not self .gettable and get_cmd is not False :
272
+ elif not self ._implements_get_raw and get_cmd is not False :
271
273
if get_cmd is None :
272
274
# ignore typeerror since mypy does not allow setting a method dynamically
273
275
self .get_raw = MethodType (_get_manual_parameter , self ) # type: ignore[method-assign]
@@ -293,13 +295,13 @@ def _set_manual_parameter(
293
295
# this may be resolvable if Command above is correctly wrapped in MethodType
294
296
self .get = self ._wrap_get (self .get_raw ) # type: ignore[arg-type]
295
297
296
- if self .settable and set_cmd not in (None , False ):
298
+ if self ._implements_set_raw and set_cmd not in (None , False ):
297
299
raise TypeError (
298
300
"Supplying a not None or False `set_cmd` to a Parameter"
299
301
" that already implements"
300
302
" set_raw is an error."
301
303
)
302
- elif not self .settable and set_cmd is not False :
304
+ elif not self ._implements_set_raw and set_cmd is not False :
303
305
if set_cmd is None :
304
306
# ignore typeerror since mypy does not allow setting a method dynamically
305
307
self .set_raw = MethodType (_set_manual_parameter , self ) # type: ignore[method-assign]
0 commit comments