Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
dperl-dls committed Sep 10, 2024
1 parent 23ab7ce commit efa6bff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class JsonMetadataWriter(CallbackBase):
flux: float | None = None
transmission: float | None = None

def start(self, doc: dict):
def start(self, doc: dict): # type: ignore
if doc.get("subplan_name") == "rotation_scan_with_cleanup":
LOGGER.info(
"Nexus writer recieved start document with experiment parameters."
Expand All @@ -41,10 +41,10 @@ def start(self, doc: dict):
self.parameters = RotationScanParameters(**json.loads(json_params))
self.run_start_uid = doc.get("uid")

def descriptor(self, doc: dict):
def descriptor(self, doc: dict): # type: ignore
self.descriptors[doc["uid"]] = doc

def event(self, doc: dict):
def event(self, doc: dict): # type: ignore
LOGGER.info("Nexus handler received event document.")
event_descriptor = self.descriptors[doc["descriptor"]]

Expand Down Expand Up @@ -74,7 +74,7 @@ def event(self, doc: dict):
f"Nexus handler received beam parameters, transmission: {self.transmission}, flux: {self.flux}, wavelength: {self.wavelength}." # noqa
)

def stop(self, doc: dict):
def stop(self, doc: dict): # type: ignore
if (
self.run_start_uid is not None
and doc.get("run_start") == self.run_start_uid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ def test_do_dark_acq(
jungfrau: JungfrauM1 = fake_devices["jungfrau"]

RE(do_manual_acquisition(jungfrau, 0.001, 0.001, 1000))
jungfrau.acquire_start.set.assert_called()
jungfrau.acquire_start.set.assert_called() # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def test_rotation_scan_get_plan(
async def test_cleanup_plan(bps_wait, fake_devices: JfDevices, RE: RunEngine):
zebra: Zebra = fake_devices["zebra"]
RE(arm_zebra(zebra))
assert (await zebra.pc.arm.armed.get_value()).value == 1
assert (await zebra.pc.arm.armed.get_value()).value == 1 # type: ignore
RE(cleanup_plan(zebra))
assert (await zebra.pc.arm.armed.get_value()).value == 0
assert (await zebra.pc.arm.armed.get_value()).value == 0 # type: ignore


@patch(
Expand Down

0 comments on commit efa6bff

Please sign in to comment.