Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jul 10, 2024
1 parent eb053b1 commit fece1e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,4 +311,4 @@ def convert_plate_presence(
"OCCUPIED": AbsorbanceReaderPlatePresence.PRESENT,
"UNDETERMINED": AbsorbanceReaderPlatePresence.UNKNOWN,
}
return state_map[slot_state]
return state_map[slot_state]
6 changes: 4 additions & 2 deletions api/src/opentrons/protocol_engine/state/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def get_labware_parent_nominal_position(self, labware_id: str) -> Point:
addressable_area_name = self._get_staging_slot_name(labware_id)
except errors.LocationIsLidDockSlotError:
addressable_area_name = self._get_lid_dock_slot_name(labware_id)
slot_pos = self._addressable_areas.get_addressable_area_position(addressable_area_name)
slot_pos = self._addressable_areas.get_addressable_area_position(
addressable_area_name
)
labware_data = self._labware.get(labware_id)

offset = self._get_labware_position_offset(labware_id, labware_data.location)
Expand Down Expand Up @@ -561,7 +563,7 @@ def _get_staging_slot_name(self, labware_id: str) -> str:
raise ValueError(
"Cannot get staging slot name for labware not on staging slot."
)

def _get_lid_dock_slot_name(self, labware_id: str) -> str:
"""Get the staging slot name that the labware is on."""
labware_location = self._labware.get(labware_id).location
Expand Down
6 changes: 4 additions & 2 deletions api/src/opentrons/protocol_engine/state/labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,12 @@ def get_fixed_trash_id(self) -> Optional[str]:
def is_fixed_trash(self, labware_id: str) -> bool:
"""Check if labware is fixed trash."""
return self.get_has_quirk(labware_id, "fixedTrash")

def is_absorbance_reader_lid(self, labware_id: str) -> bool:
"""Check if labware is an absorbance reader lid."""
return labware_validation.is_absorbance_reader_lid(self.get(labware_id).loadName)
return labware_validation.is_absorbance_reader_lid(
self.get(labware_id).loadName
)

def raise_if_labware_inaccessible_by_pipette(self, labware_id: str) -> None:
"""Raise an error if the specified location cannot be reached via a pipette."""
Expand Down

0 comments on commit fece1e7

Please sign in to comment.