Skip to content

Commit

Permalink
refactor(api): Delete re-exports from protocol_engine/state/__init__.…
Browse files Browse the repository at this point in the history
…py (#16129)
  • Loading branch information
SyntaxColoring authored Aug 28, 2024
1 parent 060cd62 commit 392bf1c
Show file tree
Hide file tree
Showing 145 changed files with 183 additions and 249 deletions.
13 changes: 4 additions & 9 deletions api/src/opentrons/protocol_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@
CommandType,
CommandIntent,
)
from .state import (
State,
StateView,
StateSummary,
CommandSlice,
CommandPointer,
Config,
CommandErrorSlice,
)
from .state.state import State, StateView
from .state.state_summary import StateSummary
from .state.commands import CommandSlice, CommandErrorSlice, CommandPointer
from .state.config import Config
from .plugins import AbstractPlugin

from .types import (
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/clients/sync_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .. import commands
from ..commands.command_unions import CREATE_TYPES_BY_PARAMS_TYPE
from ..state import StateView
from ..state.state import StateView
from ..types import (
Liquid,
LabwareOffsetCreate,
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/clients/transports.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ..protocol_engine import ProtocolEngine
from ..errors import ProtocolCommandFailedError
from ..error_recovery_policy import ErrorRecoveryType
from ..state import StateView
from ..state.state import StateView
from ..commands import Command, CommandCreate, CommandResult, CommandStatus


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from opentrons.drivers.types import AbsorbanceReaderLidStatus

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import (
EquipmentHandler,
LabwareMovementHandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from opentrons.drivers.types import AbsorbanceReaderLidStatus

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import (
EquipmentHandler,
LabwareMovementHandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/aspirate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if TYPE_CHECKING:
from ..execution import MovementHandler, PipettingHandler
from ..resources import ModelUtils
from ..state import StateView
from ..state.state import StateView
from ..notes import CommandNoteAdder


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if TYPE_CHECKING:
from ..execution import PipettingHandler, GantryMover
from ..resources import ModelUtils
from ..state import StateView
from ..state.state import StateView
from ..notes import CommandNoteAdder

AspirateInPlaceCommandType = Literal["aspirateInPlace"]
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/blow_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

if TYPE_CHECKING:
from ..execution import MovementHandler, PipettingHandler
from ..state import StateView
from ..state.state import StateView

BlowOutCommandType = Literal["blowout"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if TYPE_CHECKING:
from ..execution import PipettingHandler
from ..state import StateView
from ..state.state import StateView


BlowOutInPlaceCommandType = Literal["blowOutInPlace"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Work around type-only circular dependencies.
if TYPE_CHECKING:
from ...state import StateView
from ...state.state import StateView

from ...types import ModuleOffsetVector, DeckSlotLocation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

if TYPE_CHECKING:
from opentrons.hardware_control import HardwareControlAPI
from ...state import StateView
from ...state.state import StateView

# These offsets supplied from HW
_ATTACH_POINT = Point(x=0, y=110)
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# Work around type-only circular dependencies.
if TYPE_CHECKING:
from .. import execution
from ..state import StateView
from ..state.state import StateView


_ParamsT = TypeVar("_ParamsT", bound=BaseModel)
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/drop_tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from ..state import StateView
from ..state.state import StateView
from ..execution import MovementHandler, TipHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler

DeactivateShakerCommandType = Literal["heaterShaker/deactivateShaker"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler, MovementHandler

OpenLabwareLatchCommandType = Literal["heaterShaker/openLabwareLatch"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler, MovementHandler

SetAndWaitForShakeSpeedCommandType = Literal["heaterShaker/setAndWaitForShakeSpeed"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/load_labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ..errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from ..state import StateView
from ..state.state import StateView
from ..execution import EquipmentHandler


Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/load_liquid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from ..state import StateView
from ..state.state import StateView

LoadLiquidCommandType = Literal["loadLiquid"]

Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/load_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from opentrons.drivers.types import AbsorbanceReaderLidStatus

if TYPE_CHECKING:
from ..state import StateView
from ..state.state import StateView
from ..execution import EquipmentHandler


Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/load_pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

if TYPE_CHECKING:
from ..execution import EquipmentHandler
from ..state import StateView
from ..state.state import StateView


LoadPipetteCommandType = Literal["loadPipette"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

if TYPE_CHECKING:
from opentrons.protocol_engine.execution import EquipmentHandler
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView


DisengageCommandType = Literal["magneticModule/disengage"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

if TYPE_CHECKING:
from opentrons.protocol_engine.execution import EquipmentHandler
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView


EngageCommandType = Literal["magneticModule/engage"]
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/move_labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

if TYPE_CHECKING:
from ..execution import EquipmentHandler, RunControlHandler, LabwareMovementHandler
from ..state import StateView
from ..state.state import StateView


MoveLabwareCommandType = Literal["moveLabware"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if TYPE_CHECKING:
from ..execution import MovementHandler
from ..state import StateView
from ..state.state import StateView

MoveToAddressableAreaCommandType = Literal["moveToAddressableArea"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if TYPE_CHECKING:
from ..execution import MovementHandler
from ..state import StateView
from ..state.state import StateView

MoveToAddressableAreaForDropTipCommandType = Literal["moveToAddressableAreaForDropTip"]

Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/pick_up_tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
)

if TYPE_CHECKING:
from ..state import StateView
from ..state.state import StateView
from ..execution import MovementHandler, TipHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from ..state import StateView
from ..state.state import StateView
from ..execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler

DeactivateTemperatureCommandType = Literal["temperatureModule/deactivate"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler

SetTargetTemperatureCommandType = Literal["temperatureModule/setTargetTemperature"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler

WaitForTemperatureCommandType = Literal["temperatureModule/waitForTemperature"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from opentrons.protocol_engine.types import MotorAxis

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler, MovementHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from opentrons.protocol_engine.types import MotorAxis

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler, MovementHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ...errors.error_occurrence import ErrorOccurrence

if TYPE_CHECKING:
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.state import StateView
from opentrons.protocol_engine.execution import EquipmentHandler


Expand Down
Loading

0 comments on commit 392bf1c

Please sign in to comment.