Skip to content

Commit

Permalink
Make type-checking happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuck99 committed Nov 22, 2024
1 parent a3b7463 commit 5cfe52c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import dataclasses
import time
from abc import ABC
from typing import Literal

from bluesky.protocols import Readable, Reading
from event_model import DataKey
Expand Down Expand Up @@ -47,7 +48,7 @@ def _reading_from_value(cls, value):
return Reading(timestamp=time.time(), value=value)

@classmethod
def _dtype_of(cls, t: type) -> str:
def _dtype_of(cls, t) -> Literal["string", "number", "boolean", "integer"]:
match t:
case builtins.str:
return "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import bluesky.plan_stubs as bps
import bluesky.preprocessors as bpp
from bluesky import RunEngine
from bluesky.run_engine import RunEngine

from mx_bluesky.hyperion.external_interaction.callbacks.common.abstract_event import (
AbstractEvent,
Expand Down

0 comments on commit 5cfe52c

Please sign in to comment.