Skip to content

Commit ec51ac0

Browse files
Rename AddressableArea -> AddressableAreaV4
This has a matingSurfaceUnitVector field, which does not exist in schema 6. Rename the type so it doesn't look more generally usable than it actually is.
1 parent fb5eb31 commit ec51ac0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

shared-data/python/opentrons_shared_data/deck/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class _RequiredAddressableArea(TypedDict):
108108
displayName: str
109109

110110

111-
class AddressableArea(_RequiredAddressableArea, total=False):
111+
class AddressableAreaV4(_RequiredAddressableArea, total=False):
112112
compatibleModuleTypes: List[ModuleType]
113113
matingSurfaceUnitVector: List[Union[Literal[1], Literal[-1]]]
114114
ableToDropTips: bool
@@ -150,7 +150,7 @@ class LocationsV3(TypedDict):
150150

151151

152152
class LocationsV4(TypedDict):
153-
addressableAreas: List[AddressableArea]
153+
addressableAreas: List[AddressableAreaV4]
154154
calibrationPoints: List[CalibrationPoint]
155155
cutouts: List[Cutout]
156156
legacyFixtures: List[Fixture]

shared-data/python/tests/deck/test_position.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
load as load_deck_definition,
88
)
99
from opentrons_shared_data.deck.types import (
10-
AddressableArea,
10+
AddressableAreaV4,
1111
Cutout,
1212
CutoutFixture,
1313
DeckDefinitionV3,
@@ -33,13 +33,13 @@ def get_v3_slot_positions(
3333

3434
def get_v4_stacks(
3535
definition: DeckDefinitionV4,
36-
) -> Generator[Tuple[Cutout, CutoutFixture, AddressableArea], None, None]:
36+
) -> Generator[Tuple[Cutout, CutoutFixture, AddressableAreaV4], None, None]:
3737
"""Yield all the (cutout, cutoutFixture, addressableArea) combinations that the def allows."""
3838
cutout_fixtures = definition["cutoutFixtures"]
3939
cutouts_by_id: Dict[str, Cutout] = {
4040
cutout["id"]: cutout for cutout in definition["locations"]["cutouts"]
4141
}
42-
addressable_areas_by_id: Dict[str, AddressableArea] = {
42+
addressable_areas_by_id: Dict[str, AddressableAreaV4] = {
4343
addressable_area["id"]: addressable_area
4444
for addressable_area in definition["locations"]["addressableAreas"]
4545
}
@@ -55,7 +55,7 @@ def get_v4_stacks(
5555

5656

5757
def compute_v4_position(
58-
cutout: Cutout, addressable_area: AddressableArea
58+
cutout: Cutout, addressable_area: AddressableAreaV4
5959
) -> List[float]:
6060
return [
6161
a + b

0 commit comments

Comments
 (0)