Skip to content

Commit

Permalink
type change
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Oct 16, 2024
1 parent a053fd3 commit 53dc1ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/blueapi/worker/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from blueapi.utils import BlueapiBaseModel

# The RunEngine can return any of these three types as its state
RawRunEngineState = type[PropertyMachine | ProxyString | str]
# RawRunEngineState = type[PropertyMachine | ProxyString | str]
RawRunEngineState = PropertyMachine | ProxyString | str


# NOTE this is interim until refactor
Expand Down
3 changes: 2 additions & 1 deletion src/blueapi/worker/task_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def __init__(
self._tasks = {}

assert ctx.run_engine.state is not None, "RunEngine state is not set"
self._state = WorkerState.from_bluesky_state(ctx.run_engine.state)
state: RawRunEngineState = str(ctx.run_engine.state)
self._state = WorkerState.from_bluesky_state(state)
self._errors = []
self._warnings = []
self._task_channel = Queue(maxsize=1)
Expand Down

0 comments on commit 53dc1ad

Please sign in to comment.