Skip to content

Commit 059e368

Browse files
committed
make OT resource loading slightly nicer
1 parent a344177 commit 059e368

File tree

1 file changed

+9
-13
lines changed
  • pylabrobot/resources/opentrons

1 file changed

+9
-13
lines changed

pylabrobot/resources/opentrons/load.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from pylabrobot.resources.coordinate import Coordinate
1313
from pylabrobot.resources.plate import Plate
14-
from pylabrobot.resources.tip import Tip, TipCreator
14+
from pylabrobot.resources.tip import Tip
1515
from pylabrobot.resources.tip_rack import TipRack, TipSpot
1616
from pylabrobot.resources.tube import Tube
1717
from pylabrobot.resources.tube_rack import TubeRack
@@ -106,23 +106,19 @@ def volume_from_name(name: str) -> float:
106106
wells.append(well)
107107
elif display_category == "tipRack":
108108
# closure
109-
def make_make_tip(well_data) -> TipCreator:
110-
def make_tip() -> Tip:
111-
total_tip_length = well_data["depth"]
112-
return Tip(
113-
total_tip_length=total_tip_length,
114-
has_filter="Filter" in data["metadata"]["displayName"],
115-
maximal_volume=volume_from_name(data["metadata"]["displayName"]),
116-
fitting_depth=data["parameters"]["tipOverlap"],
117-
)
118-
119-
return make_tip
109+
def make_tip() -> Tip:
110+
return Tip(
111+
total_tip_length=data["parameters"]["tipLength"],
112+
has_filter="Filter" in data["metadata"]["displayName"],
113+
maximal_volume=volume_from_name(data["metadata"]["displayName"]),
114+
fitting_depth=data["parameters"]["tipOverlap"],
115+
)
120116

121117
tip_spot = TipSpot(
122118
name=item,
123119
size_x=well_size_x,
124120
size_y=well_size_y,
125-
make_tip=make_make_tip(well_data),
121+
make_tip=make_tip,
126122
)
127123
tip_spot.location = location
128124
wells.append(tip_spot)

0 commit comments

Comments
 (0)