From c55174087f14c8c7e71f8da0feee52d1182cfd86 Mon Sep 17 00:00:00 2001 From: Ryan howard Date: Mon, 21 Oct 2024 15:37:15 -0400 Subject: [PATCH] use the typing types instead of builtin types --- api/src/opentrons/hardware_control/backends/flex_protocol.py | 2 +- api/src/opentrons/hardware_control/backends/ot3controller.py | 2 +- api/src/opentrons/hardware_control/backends/ot3simulator.py | 2 +- api/src/opentrons/hardware_control/ot3api.py | 4 ++-- api/tests/opentrons/hardware_control/test_ot3_api.py | 2 +- hardware/opentrons_hardware/hardware_control/tool_sensors.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/src/opentrons/hardware_control/backends/flex_protocol.py b/api/src/opentrons/hardware_control/backends/flex_protocol.py index 8cd24c19c51..466e7890026 100644 --- a/api/src/opentrons/hardware_control/backends/flex_protocol.py +++ b/api/src/opentrons/hardware_control/backends/flex_protocol.py @@ -157,7 +157,7 @@ async def liquid_probe( probe: InstrumentProbeType = InstrumentProbeType.PRIMARY, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> float: ... diff --git a/api/src/opentrons/hardware_control/backends/ot3controller.py b/api/src/opentrons/hardware_control/backends/ot3controller.py index 5151955e5a3..48787e86933 100644 --- a/api/src/opentrons/hardware_control/backends/ot3controller.py +++ b/api/src/opentrons/hardware_control/backends/ot3controller.py @@ -1373,7 +1373,7 @@ async def liquid_probe( probe: InstrumentProbeType = InstrumentProbeType.PRIMARY, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> float: head_node = axis_to_node(Axis.by_mount(mount)) diff --git a/api/src/opentrons/hardware_control/backends/ot3simulator.py b/api/src/opentrons/hardware_control/backends/ot3simulator.py index 4f33557841b..017c90c45b3 100644 --- a/api/src/opentrons/hardware_control/backends/ot3simulator.py +++ b/api/src/opentrons/hardware_control/backends/ot3simulator.py @@ -351,7 +351,7 @@ async def liquid_probe( probe: InstrumentProbeType = InstrumentProbeType.PRIMARY, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> float: z_axis = Axis.by_mount(mount) diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index c81568a2673..ebd56d106d1 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -2636,7 +2636,7 @@ async def _liquid_probe_pass( p_travel: float, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> float: plunger_direction = -1 if probe_settings.aspirate_while_sensing else 1 @@ -2672,7 +2672,7 @@ async def liquid_probe( # noqa: C901 probe: Optional[InstrumentProbeType] = None, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> float: """Search for and return liquid level height. diff --git a/api/tests/opentrons/hardware_control/test_ot3_api.py b/api/tests/opentrons/hardware_control/test_ot3_api.py index f13b4138a5b..783f438d914 100644 --- a/api/tests/opentrons/hardware_control/test_ot3_api.py +++ b/api/tests/opentrons/hardware_control/test_ot3_api.py @@ -1149,7 +1149,7 @@ async def _fake_pos_update_and_raise( probe: InstrumentProbeType = InstrumentProbeType.PRIMARY, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> float: pos = self._position diff --git a/hardware/opentrons_hardware/hardware_control/tool_sensors.py b/hardware/opentrons_hardware/hardware_control/tool_sensors.py index 3081b6ace9f..95076f01c1c 100644 --- a/hardware/opentrons_hardware/hardware_control/tool_sensors.py +++ b/hardware/opentrons_hardware/hardware_control/tool_sensors.py @@ -272,7 +272,7 @@ async def liquid_probe( sensor_id: SensorId = SensorId.S0, force_both_sensors: bool = False, response_queue: Optional[ - asyncio.Queue[dict[SensorId, list[SensorDataType]]] + asyncio.Queue[Dict[SensorId, List[SensorDataType]]] ] = None, ) -> Dict[NodeId, MotorPositionStatus]: """Move the mount and pipette simultaneously while reading from the pressure sensor."""