Skip to content

Commit

Permalink
Merge pull request #370 from DiamondLightSource/remove-annotated
Browse files Browse the repository at this point in the history
Remove use of Annotated from return types of plans
  • Loading branch information
DiamondJoseph authored Mar 12, 2024
2 parents 19efffb + 3f9e618 commit cce8a05
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/dodal/common/types.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
from typing import (
Annotated,
Any,
Callable,
Generator,
)

from bluesky.utils import Msg

Group = Annotated[str, "String identifier used by 'wait' or stubs that await"]
MsgGenerator = Annotated[
Generator[Msg, Any, None],
"A true 'plan', usually the output of a generator function",
]
PlanGenerator = Annotated[
Callable[..., MsgGenerator], "A function that generates a plan"
]
# 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]

0 comments on commit cce8a05

Please sign in to comment.