From 3521e754203ad8452a3af73534d20b8c6a9a096f Mon Sep 17 00:00:00 2001 From: tamarzanzouri Date: Fri, 20 Sep 2024 13:46:54 -0400 Subject: [PATCH] linting --- .../protocol_engine/commands/absorbance_reader/close_lid.py | 2 +- .../protocol_engine/commands/absorbance_reader/open_lid.py | 6 +++--- api/src/opentrons/protocol_engine/commands/move_labware.py | 2 +- .../opentrons/protocol_engine/commands/reload_labware.py | 6 +++--- api/src/opentrons/protocol_engine/execution/__init__.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py b/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py index 302a192634a..4d7975826e9 100644 --- a/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +++ b/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py @@ -12,7 +12,7 @@ from opentrons.protocol_engine.resources import labware_validation from .types import MoveLidResult -from ...state.update_types import StateUpdate, BaseLabwareData +from ...state.update_types import StateUpdate from opentrons.drivers.types import AbsorbanceReaderLidStatus diff --git a/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py b/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py index b40b3bbf6f9..500ae1138c6 100644 --- a/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +++ b/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py @@ -15,7 +15,7 @@ from opentrons.drivers.types import AbsorbanceReaderLidStatus -from ...state.update_types import StateUpdate, BaseLabwareData +from ...state.update_types import StateUpdate if TYPE_CHECKING: @@ -55,8 +55,6 @@ def __init__( async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, None]: """Move the absorbance reader lid from the module to the lid dock.""" - state_update = StateUpdate() - mod_substate = self._state_view.modules.get_absorbance_reader_substate( module_id=params.moduleId ) @@ -130,6 +128,8 @@ async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, Non labware_location=new_location, ) + state_update = StateUpdate() + state_update.set_lid_status( labware_id=loaded_lid.id, location=new_location, offset_id=new_offset_id ) diff --git a/api/src/opentrons/protocol_engine/commands/move_labware.py b/api/src/opentrons/protocol_engine/commands/move_labware.py index 8790aed0da4..02c0f57c469 100644 --- a/api/src/opentrons/protocol_engine/commands/move_labware.py +++ b/api/src/opentrons/protocol_engine/commands/move_labware.py @@ -21,7 +21,7 @@ from ..resources import labware_validation, fixture_validation from .command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData from ..errors.error_occurrence import ErrorOccurrence -from ..state.update_types import BaseLabwareData, StateUpdate, UpdateLabwareLocation +from ..state.update_types import StateUpdate, UpdateLabwareLocation from opentrons_shared_data.gripper.constants import GRIPPER_PADDLE_WIDTH if TYPE_CHECKING: diff --git a/api/src/opentrons/protocol_engine/commands/reload_labware.py b/api/src/opentrons/protocol_engine/commands/reload_labware.py index 5d04e157335..162ae8c64aa 100644 --- a/api/src/opentrons/protocol_engine/commands/reload_labware.py +++ b/api/src/opentrons/protocol_engine/commands/reload_labware.py @@ -6,7 +6,7 @@ from .command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData from ..errors.error_occurrence import ErrorOccurrence -from ..state.update_types import BaseLabwareData, StateUpdate +from ..state.update_types import StateUpdate if TYPE_CHECKING: from ..state.state import StateView @@ -61,12 +61,12 @@ async def execute( self, params: ReloadLabwareParams ) -> SuccessData[ReloadLabwareResult, None]: """Reload the definition and calibration data for a specific labware.""" - state_update = StateUpdate() - reloaded_labware = await self._equipment.reload_labware( labware_id=params.labwareId, ) + state_update = StateUpdate() + state_update.set_reloaded_labware( labware_id=params.labwareId, location=reloaded_labware.location, diff --git a/api/src/opentrons/protocol_engine/execution/__init__.py b/api/src/opentrons/protocol_engine/execution/__init__.py index 59334abe069..80f2dfd0d99 100644 --- a/api/src/opentrons/protocol_engine/execution/__init__.py +++ b/api/src/opentrons/protocol_engine/execution/__init__.py @@ -4,10 +4,10 @@ from .create_queue_worker import create_queue_worker from .equipment import ( EquipmentHandler, + LoadedLabwareData, LoadedPipetteData, LoadedModuleData, LoadedConfigureForVolumeData, - LoadedLabwareData, ReloadedLabwareData, ) from .movement import MovementHandler