Skip to content

Commit

Permalink
remove the bisect refernce
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Jul 2, 2024
1 parent df924b1 commit 9d725b8
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/blueapi/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,6 @@
DevicesDict = dict[str, Device]


def bisect_devices_dict(input_dict: DevicesDict) -> tuple[DevicesDict, DevicesDict]:
lazy_dict = {}
non_lazy_dict = {}

for key, value in input_dict.items():
# Assuming 'lazy' is an attribute or a condition you can check
if hasattr(value, "lazy") and value.lazy:
lazy_dict[key] = value
else:
non_lazy_dict[key] = value

return (non_lazy_dict, lazy_dict)


@dataclass
class BlueskyContext:
"""
Expand Down Expand Up @@ -126,7 +112,7 @@ def with_dodal_module(self, module: ModuleType, **kwargs) -> None:
devices, exceptions = make_all_devices(module, **kwargs)

# for non-lazy devices, we instantiate them
early_devices, _ = bisect_devices_dict(devices)
early_devices = devices.items().filter(lambda x: not x.lazy)

for device in early_devices.values():
self.register_device(device)
Expand Down

0 comments on commit 9d725b8

Please sign in to comment.