Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Sep 27, 2024
1 parent a213c1f commit 7dde099
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Drop tip in place command request, result, and implementation models."""
from __future__ import annotations
from opentrons.protocol_engine.state import update_types
from opentrons.protocol_engine.types import TipGeometry
from pydantic import Field, BaseModel
from typing import TYPE_CHECKING, Optional, Type
from typing_extensions import Literal
Expand Down
5 changes: 1 addition & 4 deletions api/src/opentrons/protocol_engine/state/pipettes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
CurrentPipetteLocation,
TipGeometry,
)
from ..commands.configuring_common import (
PipetteNozzleLayoutResultMixin,
)
from ..actions import (
Action,
SetPipetteMovementSpeedAction,
Expand Down Expand Up @@ -148,7 +145,7 @@ def handle_action(self, action: Action) -> None:
elif isinstance(action, SetPipetteMovementSpeedAction):
self._state.movement_speed_by_id[action.pipette_id] = action.speed

def _handle_command( # noqa: C901
def _handle_command(
self, action: Union[SucceedCommandAction, FailCommandAction]
) -> None:
self._set_load_pipette(action)
Expand Down
5 changes: 5 additions & 0 deletions api/src/opentrons/protocol_engine/state/update_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def set_labware_location( # noqa: D102
new_location: LabwareLocation,
new_offset_id: str | None,
) -> None:
"""Set labware location."""
self.labware_location = LabwareLocationUpdate(
labware_id=labware_id,
new_location=new_location,
Expand Down Expand Up @@ -248,6 +249,7 @@ def set_load_pipette(
mount: MountType,
liquid_presence_detection: typing.Optional[bool],
) -> None:
"""Add loaded pipette to state."""
self.loaded_pipette = LoadPipetteUpdate(
pipette_id=pipette_id,
pipette_name=pipette_name,
Expand All @@ -261,18 +263,21 @@ def update_pipette_config(
config: pipette_data_provider.LoadedStaticPipetteData,
serial_number: str,
) -> None:
"""Update pipette config."""
self.pipette_config = PipetteConfigUpdate(
pipette_id=pipette_id, config=config, serial_number=serial_number
)

def update_pipette_nozzle(self, pipette_id: str, nozzle_map: NozzleMap) -> None:
"""Update pipette nozzle map."""
self.pipette_nozzle_map = PipetteNozzleMapUpdate(
pipette_id=pipette_id, nozzle_map=nozzle_map
)

def update_tip_state(
self, pipette_id: str, tip_geometry: typing.Optional[TipGeometry]
) -> None:
"""Update tip state."""
self.pipette_tip_state = PipetteTipStateUpdate(
pipette_id=pipette_id, tip_geometry=tip_geometry
)

0 comments on commit 7dde099

Please sign in to comment.