Skip to content

Commit 8638e1c

Browse files
committed
allow_nonzero_volume for lh.return_tips
1 parent 82322ac commit 8638e1c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

pylabrobot/liquid_handling/liquid_handler.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,12 @@ async def drop_tips(
591591
**backend_kwargs,
592592
)
593593

594-
async def return_tips(self, use_channels: Optional[list[int]] = None, **backend_kwargs):
594+
async def return_tips(
595+
self,
596+
use_channels: Optional[list[int]] = None,
597+
allow_nonzero_volume: bool = False,
598+
**backend_kwargs,
599+
):
595600
"""Return all tips that are currently picked up to their original place.
596601
597602
Examples:
@@ -601,6 +606,9 @@ async def return_tips(self, use_channels: Optional[list[int]] = None, **backend_
601606
>>> await lh.return_tips()
602607
603608
Args:
609+
use_channels: List of channels to use. Index from front to back. If `None`, all that have
610+
tips will be used.
611+
allow_nonzero_volume: If `True`, tips will be returned even if their volumes are not zero.
604612
backend_kwargs: backend kwargs passed to `drop_tips`.
605613
606614
Raises:
@@ -623,7 +631,11 @@ async def return_tips(self, use_channels: Optional[list[int]] = None, **backend_
623631
if len(tip_spots) == 0:
624632
raise RuntimeError("No tips have been picked up.")
625633

626-
return await self.drop_tips(tip_spots=tip_spots, use_channels=channels, **backend_kwargs)
634+
return await self.drop_tips(
635+
tip_spots=tip_spots,
636+
use_channels=channels,
637+
allow_nonzero_volume=allow_nonzero_volume**backend_kwargs,
638+
)
627639

628640
async def discard_tips(
629641
self,
@@ -645,6 +657,7 @@ async def discard_tips(
645657
Args:
646658
use_channels: List of channels to use. Index from front to back. If `None`, all that have
647659
tips will be used.
660+
allow_nonzero_volume: If `True`, tips will be returned even if their volumes are not zero.
648661
backend_kwargs: Additional keyword arguments for the backend, optional.
649662
"""
650663

0 commit comments

Comments
 (0)