diff --git a/src/dodal/common/types.py b/src/dodal/common/types.py index 22c546c655..4a2a28e4b1 100644 --- a/src/dodal/common/types.py +++ b/src/dodal/common/types.py @@ -1,16 +1,11 @@ from abc import ABC, abstractmethod -from collections.abc import Callable, Generator -from typing import ( - Any, -) +from collections.abc import Callable -from bluesky.utils import Msg +from bluesky.utils import MsgGenerator from ophyd_async.core import PathProvider # String identifier used by 'wait' or stubs that await Group = str -# A true 'plan', usually the output of a generator function -MsgGenerator = Generator[Msg, Any, None] # A function that generates a plan PlanGenerator = Callable[..., MsgGenerator] diff --git a/src/dodal/plans/data_session_metadata.py b/src/dodal/plans/data_session_metadata.py index 46b7edc59e..bfdd91d5c2 100644 --- a/src/dodal/plans/data_session_metadata.py +++ b/src/dodal/plans/data_session_metadata.py @@ -1,9 +1,9 @@ from bluesky import plan_stubs as bps from bluesky import preprocessors as bpp -from bluesky.utils import make_decorator +from bluesky.utils import MsgGenerator, make_decorator from dodal.common.beamlines import beamline_utils -from dodal.common.types import MsgGenerator, UpdatingPathProvider +from dodal.common.types import UpdatingPathProvider DATA_SESSION = "data_session" DATA_GROUPS = "data_groups" diff --git a/src/dodal/plans/motor_util_plans.py b/src/dodal/plans/motor_util_plans.py index ee4acd4d08..7dfcb3037e 100644 --- a/src/dodal/plans/motor_util_plans.py +++ b/src/dodal/plans/motor_util_plans.py @@ -4,11 +4,10 @@ from bluesky import plan_stubs as bps from bluesky.preprocessors import finalize_wrapper, pchain -from bluesky.utils import Msg, make_decorator +from bluesky.utils import Msg, MsgGenerator, make_decorator from ophyd_async.core import Device from ophyd_async.epics.motor import Motor -from dodal.common import MsgGenerator from dodal.utils import MovableReadable MovableReadableDevice = TypeVar("MovableReadableDevice", bound=MovableReadable) diff --git a/tests/common/test_coordination.py b/tests/common/test_coordination.py index 3e24552786..8c0ec6adad 100644 --- a/tests/common/test_coordination.py +++ b/tests/common/test_coordination.py @@ -2,9 +2,9 @@ import pytest from bluesky.protocols import Movable +from bluesky.utils import MsgGenerator from dodal.common.coordination import group_uuid, inject -from dodal.common.types import MsgGenerator static_uuid = "51aef931-33b4-4b33-b7ad-a8287f541202" diff --git a/tests/preprocessors/test_filesystem_metadata.py b/tests/preprocessors/test_filesystem_metadata.py index 6904f3bb1c..a4ad0559ec 100644 --- a/tests/preprocessors/test_filesystem_metadata.py +++ b/tests/preprocessors/test_filesystem_metadata.py @@ -14,11 +14,12 @@ ) from bluesky.protocols import HasName, Readable, Reading, Triggerable from bluesky.run_engine import RunEngine +from bluesky.utils import MsgGenerator from event_model.documents.event_descriptor import DataKey from ophyd_async.core import AsyncStatus, DeviceCollector, PathProvider from pydantic import BaseModel -from dodal.common.types import MsgGenerator, UpdatingPathProvider +from dodal.common.types import UpdatingPathProvider from dodal.common.visit import ( DataCollectionIdentifier, DirectoryServiceClient,