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 7, 2024
1 parent c4ed30b commit 7b43714
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 7b43714

Please sign in to comment.