Skip to content

Commit

Permalink
refactor(api): Hide implementation details from absorbance reader res…
Browse files Browse the repository at this point in the history
…ults (#16359)
  • Loading branch information
SyntaxColoring committed Sep 26, 2024
1 parent 8d6ff9b commit edb51fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Command models for Absorbance Reader commands."""
from .types import MoveLidResult
from .close_lid import (
CloseLidCommandType,
CloseLidParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from opentrons.protocol_engine.types import AddressableAreaLocation

from opentrons.protocol_engine.resources import labware_validation
from .types import MoveLidResult
from ...state.update_types import StateUpdate


Expand All @@ -34,7 +33,7 @@ class CloseLidParams(BaseModel):
moduleId: str = Field(..., description="Unique ID of the absorbance reader.")


class CloseLidResult(MoveLidResult):
class CloseLidResult(BaseModel):
"""Result data from closing the lid on an aborbance reading."""


Expand Down Expand Up @@ -142,9 +141,7 @@ async def execute(
)

return SuccessData(
public=CloseLidResult(
lidId=loaded_lid.id, newLocation=new_location, offsetId=new_offset_id
),
public=CloseLidResult(),
private=None,
state_update=state_update,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from ...errors.error_occurrence import ErrorOccurrence
from ...errors import CannotPerformModuleAction

from .types import MoveLidResult
from opentrons.protocol_engine.resources import labware_validation
from opentrons.protocol_engine.types import AddressableAreaLocation

Expand All @@ -35,7 +34,7 @@ class OpenLidParams(BaseModel):
moduleId: str = Field(..., description="Unique ID of the absorbance reader.")


class OpenLidResult(MoveLidResult):
class OpenLidResult(BaseModel):
"""Result data from opening the lid on an aborbance reading."""


Expand Down Expand Up @@ -137,11 +136,7 @@ async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, Non
)

return SuccessData(
public=OpenLidResult(
lidId=loaded_lid.id,
newLocation=new_location,
offsetId=new_offset_id,
),
public=OpenLidResult(),
private=None,
state_update=state_update,
)
Expand Down

This file was deleted.

0 comments on commit edb51fd

Please sign in to comment.