Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(api): Delete unused action_dispatcher argument #14954

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def create_queue_worker(
equipment_handler = EquipmentHandler(
hardware_api=hardware_api,
state_store=state_store,
action_dispatcher=action_dispatcher,
)

movement_handler = MovementHandler(
Expand Down
3 changes: 0 additions & 3 deletions api/src/opentrons/protocol_engine/execution/equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
TemperatureModuleId,
ThermocyclerModuleId,
)
from ..actions import ActionDispatcher
from ..errors import (
FailedToLoadPipetteError,
LabwareDefinitionDoesNotExistError,
Expand Down Expand Up @@ -99,7 +98,6 @@ def __init__(
self,
hardware_api: HardwareControlAPI,
state_store: StateStore,
action_dispatcher: ActionDispatcher,
labware_data_provider: Optional[LabwareDataProvider] = None,
module_data_provider: Optional[ModuleDataProvider] = None,
model_utils: Optional[ModelUtils] = None,
Expand All @@ -110,7 +108,6 @@ def __init__(
"""Initialize an EquipmentHandler instance."""
self._hardware_api = hardware_api
self._state_store = state_store
self._action_dispatcher = action_dispatcher
self._labware_data_provider = labware_data_provider or LabwareDataProvider()
self._module_data_provider = module_data_provider or ModuleDataProvider()
self._model_utils = model_utils or ModelUtils()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from opentrons.protocols.models import LabwareDefinition

from opentrons.protocol_engine import errors
from opentrons.protocol_engine.actions import ActionDispatcher
from opentrons.protocol_engine.types import (
DeckSlotLocation,
DeckType,
Expand Down Expand Up @@ -84,12 +83,6 @@ def state_store(decoy: Decoy) -> StateStore:
return decoy.mock(cls=StateStore)


@pytest.fixture
def action_dispatcher(decoy: Decoy) -> ActionDispatcher:
"""Get a mocked out ActionDispatcher instance."""
return decoy.mock(cls=ActionDispatcher)


@pytest.fixture
def model_utils(decoy: Decoy) -> ModelUtils:
"""Get a mocked out ModelUtils instance."""
Expand Down Expand Up @@ -166,7 +159,6 @@ def virtual_pipette_data_provider(
def subject(
hardware_api: HardwareControlAPI,
state_store: StateStore,
action_dispatcher: ActionDispatcher,
labware_data_provider: LabwareDataProvider,
module_data_provider: ModuleDataProvider,
model_utils: ModelUtils,
Expand All @@ -176,7 +168,6 @@ def subject(
return EquipmentHandler(
hardware_api=hardware_api,
state_store=state_store,
action_dispatcher=action_dispatcher,
labware_data_provider=labware_data_provider,
module_data_provider=module_data_provider,
model_utils=model_utils,
Expand Down Expand Up @@ -614,7 +605,6 @@ async def test_load_pipette(
model_utils: ModelUtils,
hardware_api: HardwareControlAPI,
state_store: StateStore,
action_dispatcher: ActionDispatcher,
loaded_static_pipette_data: LoadedStaticPipetteData,
subject: EquipmentHandler,
) -> None:
Expand Down Expand Up @@ -665,7 +655,6 @@ async def test_load_pipette_96_channels(
model_utils: ModelUtils,
hardware_api: HardwareControlAPI,
state_store: StateStore,
action_dispatcher: ActionDispatcher,
loaded_static_pipette_data: LoadedStaticPipetteData,
subject: EquipmentHandler,
) -> None:
Expand Down Expand Up @@ -702,7 +691,6 @@ async def test_load_pipette_uses_provided_id(
decoy: Decoy,
hardware_api: HardwareControlAPI,
state_store: StateStore,
action_dispatcher: ActionDispatcher,
loaded_static_pipette_data: LoadedStaticPipetteData,
subject: EquipmentHandler,
) -> None:
Expand Down Expand Up @@ -734,7 +722,6 @@ async def test_load_pipette_use_virtual(
decoy: Decoy,
model_utils: ModelUtils,
state_store: StateStore,
action_dispatcher: ActionDispatcher,
loaded_static_pipette_data: LoadedStaticPipetteData,
subject: EquipmentHandler,
virtual_pipette_data_provider: pipette_data_provider.VirtualPipetteDataProvider,
Expand Down
Loading