From 830fd879c4934c96644795b5f419de509b717f55 Mon Sep 17 00:00:00 2001 From: Stanislaw Malinowski Date: Thu, 14 Nov 2024 13:57:52 +0000 Subject: [PATCH] lint --- src/dodal/beamlines/p38.py | 1 + src/dodal/devices/pressure_jump_cell.py | 1 + tests/devices/unit_tests/test_pressure_jump_cell.py | 13 ++++++------- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/dodal/beamlines/p38.py b/src/dodal/beamlines/p38.py index e5965dbe27..30cb2e5a99 100644 --- a/src/dodal/beamlines/p38.py +++ b/src/dodal/beamlines/p38.py @@ -331,6 +331,7 @@ def ppump( fake_with_ophyd_sim, ) + def high_pressure_xray_cell( wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False ) -> PressureJumpCell: diff --git a/src/dodal/devices/pressure_jump_cell.py b/src/dodal/devices/pressure_jump_cell.py index b132092b5c..73b47a9cbf 100644 --- a/src/dodal/devices/pressure_jump_cell.py +++ b/src/dodal/devices/pressure_jump_cell.py @@ -14,6 +14,7 @@ OPENSEQ_PULSE_LENGTH = 0.2 + class PumpState(str, Enum): MANUAL = "Manual" AUTO_PRESSURE = "Auto Pressure" diff --git a/tests/devices/unit_tests/test_pressure_jump_cell.py b/tests/devices/unit_tests/test_pressure_jump_cell.py index bf827a135d..631bc56052 100644 --- a/tests/devices/unit_tests/test_pressure_jump_cell.py +++ b/tests/devices/unit_tests/test_pressure_jump_cell.py @@ -1,5 +1,6 @@ -from unittest.mock import ANY import asyncio +from unittest.mock import ANY + import pytest from ophyd_async.core import DeviceCollector, assert_reading, set_mock_value @@ -131,14 +132,13 @@ async def test_pjumpcell_set_valve_sets_valve_fields( ) # Set new values - + await cell.all_valves_control.set_valve(1, ValveControlRequest.CLOSE) await cell.all_valves_control.set_valve(6, FastValveControlRequest.ARM) await asyncio.gather( cell.all_valves_control.set_valve(1, ValveControlRequest.OPEN), cell.all_valves_control.set_valve(6, FastValveControlRequest.OPEN), - # Check valves requested to open are set to OPEN_SEQ on initially calling # set_valve() assert_reading( @@ -153,7 +153,7 @@ async def test_pjumpcell_set_valve_sets_valve_fields( "value": ANY, "timestamp": ANY, "alarm_severity": 0, - }, + }, }, ), assert_reading( @@ -168,10 +168,9 @@ async def test_pjumpcell_set_valve_sets_valve_fields( "value": ANY, "timestamp": ANY, "alarm_severity": 0, + }, }, - }, - ) - + ), ) # Check slow valves have been set to the new value and valves requested to open are