Skip to content

Commit

Permalink
Use name attribute for full format as well
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoliaw committed Sep 9, 2024
1 parent 87f2a8d commit 6e15a10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/blueapi/cli/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def display_full(obj: Any, stream: Stream):
case DataEvent(name=name, doc=doc):
print(f"{name.title()}: {fmt_dict(doc)}")
case WorkerEvent(state=state, task_status=task):
print(f"WorkerEvent: {state}{fmt_dict(task.model_dump() if task else {})}")
print(
f"WorkerEvent: {state.name}{fmt_dict(task.model_dump() if task else {})}"
)
case ProgressEvent():
print(f"Progress:{fmt_dict(obj.model_dump())}")
case BaseModel():
Expand Down

0 comments on commit 6e15a10

Please sign in to comment.