Skip to content

Commit

Permalink
updated naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Oct 22, 2024
1 parent e8b8d6a commit 15dd2e0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions api/src/opentrons/protocol_engine/state/wells.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ def handle_action(self, action: Action) -> None:
"""Modify state in reaction to an action."""
state_update = get_state_update(action)
if state_update is not None:
self._set_loaded_liquid(state_update)
self._set_probed_liquid(state_update)
self._set_operated_liquid(state_update)
self._handle_loaded_liquid_update(state_update)
self._handle_probed_liquid_update(state_update)
self._handle_operated_liquid_update(state_update)

def _set_loaded_liquid(self, state_update: update_types.StateUpdate) -> None:
def _handle_loaded_liquid_update(
self, state_update: update_types.StateUpdate
) -> None:
if state_update.loaded_liquid != update_types.NO_CHANGE:
labware_id = state_update.loaded_liquid.labware_id
for (well, volume) in state_update.loaded_liquid.volumes.items():
Expand All @@ -50,7 +52,9 @@ def _set_loaded_liquid(self, state_update: update_types.StateUpdate) -> None:
operations_since_load=0,
)

def _set_probed_liquid(self, state_update: update_types.StateUpdate) -> None:
def _handle_probed_liquid_update(
self, state_update: update_types.StateUpdate
) -> None:
if state_update.probed_liquid != update_types.NO_CHANGE:
labware_id = state_update.probed_liquid.labware_id
well_name = state_update.probed_liquid.well_name
Expand All @@ -64,7 +68,9 @@ def _set_probed_liquid(self, state_update: update_types.StateUpdate) -> None:
operations_since_probe=0,
)

def _set_operated_liquid(self, state_update: update_types.StateUpdate) -> None:
def _handle_operated_liquid_update(
self, state_update: update_types.StateUpdate
) -> None:
if state_update.operated_liquid != update_types.NO_CHANGE:
labware_id = state_update.operated_liquid.labware_id
well_name = state_update.operated_liquid.well_name
Expand Down

0 comments on commit 15dd2e0

Please sign in to comment.