Skip to content

Commit 95db768

Browse files
committed
FIX: pass tuple to 'isinstance'
1 parent eecd3f0 commit 95db768

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

bluesky_queueserver/manager/profile_ops.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2938,11 +2938,10 @@ def convert_annotation_to_string(annotation):
29382938
Triggerable,
29392939
)
29402940

2941-
# TODO: remove try-except block when 'bluesky.protocols.NamedMovable' is
2942-
# available in every Bluesky deployment
2943-
try:
2941+
# TODO: remove this check once NameMovable becomes standard
2942+
if hasattr(bluesky.protocols, "NamedMovable"):
29442943
from bluesky.protocols import NamedMovable
2945-
except ImportError:
2944+
else:
29462945
NamedMovable = Movable
29472946

29482947
protocols_mapping = {
@@ -3308,10 +3307,10 @@ def _prepare_devices(devices, *, max_depth=0, ignore_all_subdevices_if_one_fails
33083307
from ophyd.areadetector import ADBase
33093308

33103309
def get_device_params(device):
3311-
movable_protocols = [protocols.Movable]
3310+
movable_protocols = (protocols.Movable,)
33123311
# TODO: remove this check when NamedMovable is available in every Bluesky deployment
33133312
if hasattr(protocols, "NamedMovable"):
3314-
movable_protocols.append(protocols.NamedMovable)
3313+
movable_protocols = (*movable_protocols, protocols.NamedMovable)
33153314

33163315
return {
33173316
"is_readable": isinstance(device, protocols.Readable),

0 commit comments

Comments
 (0)