From 10974f8fa6a3375dd6cb7621df3aa8f58c532b23 Mon Sep 17 00:00:00 2001 From: CaseyBatten Date: Wed, 30 Oct 2024 17:15:45 -0400 Subject: [PATCH] labware movement formatting cleanup --- .../protocol_engine/commands/move_labware.py | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/api/src/opentrons/protocol_engine/commands/move_labware.py b/api/src/opentrons/protocol_engine/commands/move_labware.py index 59c87f89fe4..eb4b101e76c 100644 --- a/api/src/opentrons/protocol_engine/commands/move_labware.py +++ b/api/src/opentrons/protocol_engine/commands/move_labware.py @@ -175,21 +175,16 @@ async def execute(self, params: MoveLabwareParams) -> _ExecuteReturn: # noqa: C if labware_validation.validate_definition_is_lid( self._state_view.labware.get_definition(params.labwareId) ): - self._state_view.labware.get_labware_gripper_offsets - if ( - "lidDisposalOffsets" - in current_labware_definition.gripperOffsets.keys() - ): + lid_disposable_offfets = ( + current_labware_definition.gripperOffsets.get( + "lidDisposalOffsets" + ) + ) + if lid_disposable_offfets is not None: trash_lid_drop_offset = LabwareOffsetVector( - x=current_labware_definition.gripperOffsets[ - "lidDisposalOffsets" - ].dropOffset.x, - y=current_labware_definition.gripperOffsets[ - "lidDisposalOffsets" - ].dropOffset.y, - z=current_labware_definition.gripperOffsets[ - "lidDisposalOffsets" - ].dropOffset.z, + x=lid_disposable_offfets.dropOffset.x, + y=lid_disposable_offfets.dropOffset.y, + z=lid_disposable_offfets.dropOffset.z, ) else: raise LabwareOffsetDoesNotExistError(