From 2b89518d727a06c0432bd7548ce63d3800b3f417 Mon Sep 17 00:00:00 2001 From: Laura Cox Date: Tue, 20 Feb 2024 22:16:24 +0200 Subject: [PATCH] fix: format, lint and typo --- api/src/opentrons/protocol_engine/execution/equipment.py | 2 +- .../protocol_engine/resources/pipette_data_provider.py | 5 ++--- .../protocol_engine/commands/test_configure_for_volume.py | 1 + .../opentrons/protocol_engine/commands/test_load_pipette.py | 4 ++-- .../protocol_engine/execution/test_equipment_handler.py | 5 ++--- .../protocol_engine/resources/test_pipette_data_provider.py | 5 +---- .../opentrons/protocol_engine/state/test_pipette_store.py | 6 +++--- 7 files changed, 12 insertions(+), 16 deletions(-) diff --git a/api/src/opentrons/protocol_engine/execution/equipment.py b/api/src/opentrons/protocol_engine/execution/equipment.py index 37f9470b84d..2487ad50aaa 100644 --- a/api/src/opentrons/protocol_engine/execution/equipment.py +++ b/api/src/opentrons/protocol_engine/execution/equipment.py @@ -246,7 +246,7 @@ async def load_pipette( return LoadedPipetteData( pipette_id=pipette_id, serial_number=serial, - static_config=static_pipette_config + static_config=static_pipette_config, ) async def load_magnetic_block( diff --git a/api/src/opentrons/protocol_engine/resources/pipette_data_provider.py b/api/src/opentrons/protocol_engine/resources/pipette_data_provider.py index f21dfe8ee35..0d8a484d4db 100644 --- a/api/src/opentrons/protocol_engine/resources/pipette_data_provider.py +++ b/api/src/opentrons/protocol_engine/resources/pipette_data_provider.py @@ -18,7 +18,6 @@ ) from ..types import FlowRates -from ...types import Point @dataclass(frozen=True) @@ -172,7 +171,7 @@ def _get_virtual_pipette_static_config_by_model( nominal_tip_overlap=config.liquid_properties[ liquid_class ].tip_overlap_dictionary, - nozzle_map=nozzle_manager.current_configuration + nozzle_map=nozzle_manager.current_configuration, ) def get_virtual_pipette_static_config( @@ -206,5 +205,5 @@ def get_pipette_static_config(pipette_dict: PipetteDict) -> LoadedStaticPipetteD # https://opentrons.atlassian.net/browse/RCORE-655 home_position=0, nozzle_offset_z=0, - nozzle_map=pipette_dict["current_nozzle_map"] + nozzle_map=pipette_dict["current_nozzle_map"], ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py b/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py index e4bfe048bda..6163aa6b2bc 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py +++ b/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py @@ -19,6 +19,7 @@ from opentrons_shared_data.pipette.dev_types import PipetteNameType from ..pipette_fixtures import get_default_nozzle_map + async def test_configure_for_volume_implementation( decoy: Decoy, equipment: EquipmentHandler, diff --git a/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py b/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py index a7d7859da3d..b0874d33c0f 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py +++ b/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py @@ -4,7 +4,7 @@ from opentrons_shared_data.pipette.dev_types import PipetteNameType from opentrons_shared_data.robot.dev_types import RobotType -from opentrons.types import MountType, Point +from opentrons.types import MountType from opentrons.protocol_engine.errors import InvalidSpecificationForRobotTypeError from opentrons.protocol_engine.types import FlowRates @@ -19,9 +19,9 @@ LoadPipettePrivateResult, LoadPipetteImplementation, ) -from opentrons_shared_data.pipette.dev_types import PipetteNameType from ..pipette_fixtures import get_default_nozzle_map + async def test_load_pipette_implementation( decoy: Decoy, equipment: EquipmentHandler, diff --git a/api/tests/opentrons/protocol_engine/execution/test_equipment_handler.py b/api/tests/opentrons/protocol_engine/execution/test_equipment_handler.py index c4502c9575f..f52cf5e7dcd 100644 --- a/api/tests/opentrons/protocol_engine/execution/test_equipment_handler.py +++ b/api/tests/opentrons/protocol_engine/execution/test_equipment_handler.py @@ -10,7 +10,7 @@ from opentrons_shared_data.labware.dev_types import LabwareUri from opentrons.calibration_storage.helpers import uri_from_details -from opentrons.types import Mount as HwMount, MountType, DeckSlotName, Point +from opentrons.types import Mount as HwMount, MountType, DeckSlotName from opentrons.hardware_control import HardwareControlAPI from opentrons.hardware_control.modules import ( TempDeck, @@ -56,7 +56,6 @@ LoadedPipetteData, LoadedModuleData, ) -from opentrons_shared_data.pipette.dev_types import PipetteNameType from ..pipette_fixtures import get_default_nozzle_map @@ -149,7 +148,7 @@ def loaded_static_pipette_data( nominal_tip_overlap={"default": 9.87}, home_position=10.11, nozzle_offset_z=12.13, - nozzle_map=get_default_nozzle_map(PipetteNameType.P300_SINGLE) + nozzle_map=get_default_nozzle_map(PipetteNameType.P300_SINGLE), ) diff --git a/api/tests/opentrons/protocol_engine/resources/test_pipette_data_provider.py b/api/tests/opentrons/protocol_engine/resources/test_pipette_data_provider.py index 14da9dceefb..94d9e5bef38 100644 --- a/api/tests/opentrons/protocol_engine/resources/test_pipette_data_provider.py +++ b/api/tests/opentrons/protocol_engine/resources/test_pipette_data_provider.py @@ -1,6 +1,4 @@ """Test pipette data provider.""" -from collections import OrderedDict - import pytest from opentrons_shared_data.pipette.dev_types import PipetteNameType, PipetteModel from opentrons_shared_data.pipette import pipette_definition, types as pip_types @@ -13,7 +11,6 @@ ) from opentrons.protocol_engine.resources import pipette_data_provider as subject -from opentrons_shared_data.pipette.dev_types import PipetteNameType from ..pipette_fixtures import get_default_nozzle_map @@ -175,7 +172,7 @@ def test_get_pipette_static_config( supported_tip_fixture: pipette_definition.SupportedTipsDefinition, ) -> None: """It should return config data given a PipetteDict.""" - dummy_nozzle_map = get_default_nozzle_map(PipetteNameType.P300_SINGLE_GEN2), + dummy_nozzle_map = get_default_nozzle_map(PipetteNameType.P300_SINGLE_GEN2) pipette_dict: PipetteDict = { "name": "p300_single_gen2", "min_volume": 20, diff --git a/api/tests/opentrons/protocol_engine/state/test_pipette_store.py b/api/tests/opentrons/protocol_engine/state/test_pipette_store.py index fbd41a971d3..4bf509176a1 100644 --- a/api/tests/opentrons/protocol_engine/state/test_pipette_store.py +++ b/api/tests/opentrons/protocol_engine/state/test_pipette_store.py @@ -51,9 +51,9 @@ create_move_relative_command, create_prepare_to_aspirate_command, ) -from opentrons_shared_data.pipette.dev_types import PipetteNameType from ..pipette_fixtures import get_default_nozzle_map + @pytest.fixture def subject() -> PipetteStore: """Get a PipetteStore test subject for all subsequent tests.""" @@ -683,7 +683,7 @@ def test_add_pipette_config( nominal_tip_overlap={"default": 5}, home_position=8.9, nozzle_offset_z=10.11, - nozzle_map=get_default_nozzle_map(PipetteNameType.P300_SINGLE) + nozzle_map=get_default_nozzle_map(PipetteNameType.P300_SINGLE), ), ) subject.handle_action( @@ -703,7 +703,7 @@ def test_add_pipette_config( nozzle_offset_z=10.11, bounding_nozzle_offsets=BoundingNozzlesOffsets( back_left_offset=Point(x=0, y=0, z=0), - front_right_offset=Point(x=0, y=0, z=0) + front_right_offset=Point(x=0, y=0, z=0), ), ) assert subject.state.flow_rates_by_id["pipette-id"].default_aspirate == {"a": 1.0}