Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura-Danielle committed Nov 3, 2024
1 parent 5fa07d7 commit eebc019
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/core/engine/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
AxisType.Z_R: MotorAxis.RIGHT_Z,
AxisType.Z_G: MotorAxis.EXTENSION_Z,
AxisType.G: MotorAxis.EXTENSION_JAW,
AxisType.Q: MotorAxis.CLAMP_JAW_96_CHANNEL,
AxisType.Q: MotorAxis.AXIS_96_CHANNEL_CAM,
}


Expand Down
4 changes: 2 additions & 2 deletions api/src/opentrons/protocol_api/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ def ensure_only_gantry_axis_map_type(
f"A critical point only accepts OT-2 gantry axes which are {AxisType.ot2_gantry_axes()}"
)
else:
if any(k not in AxisType.ot3_gantry_axes() for k in axis_map.keys()):
if any(k not in AxisType.flex_gantry_axes() for k in axis_map.keys()):
raise IncorrectAxisError(
f"A critical point only accepts Flex gantry axes which are {AxisType.ot3_gantry_axes()}"
f"A critical point only accepts Flex gantry axes which are {AxisType.flex_gantry_axes()}"
)


Expand Down
8 changes: 6 additions & 2 deletions api/src/opentrons/protocol_engine/execution/gantry_mover.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
# That OT3Simulator return value is what Protocol Engine uses for simulation when Protocol Engine
# is configured to not virtualize pipettes, so this number should match it.
VIRTUAL_MAX_OT3_HEIGHT = 248.0
# This number was found by using the longest pipette's P1000V2 default configuration values.
VIRTUAL_MAX_OT2_HEIGHT = 268.14


class GantryMover(TypingProtocol):
Expand Down Expand Up @@ -544,8 +546,10 @@ def get_max_travel_z_from_mount(self, mount: MountType) -> float:
"""Get the maximum allowed z-height for mount."""
pipette = self._state_view.pipettes.get_by_mount(mount)
if self._state_view.config.robot_type == "OT-2 Standard":
instrument_height = self._state_view.pipettes.get_instrument_max_height_ot2(
pipette.id
instrument_height = (
self._state_view.pipettes.get_instrument_max_height_ot2(pipette.id)
if pipette
else VIRTUAL_MAX_OT2_HEIGHT
)
else:
instrument_height = VIRTUAL_MAX_OT3_HEIGHT
Expand Down
4 changes: 2 additions & 2 deletions api/tests/opentrons/protocol_api/test_robot_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)
from opentrons.protocols.api_support.types import APIVersion
from opentrons.protocol_api.core.common import ProtocolCore, RobotCore
from opentrons.protocol_api import RobotContext, ModuleContext, MAX_SUPPORTED_VERSION
from opentrons.protocol_api import RobotContext, ModuleContext
from opentrons.protocol_api.deck import Deck


Expand All @@ -28,7 +28,7 @@ def mock_core(decoy: Decoy) -> RobotCore:
@pytest.fixture
def api_version() -> APIVersion:
"""Get the API version to test at."""
return MAX_SUPPORTED_VERSION
return APIVersion(2, 22)


@pytest.fixture
Expand Down

0 comments on commit eebc019

Please sign in to comment.