screws_tilt_adjust: Improve Python3 compatibility

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-09-30 13:06:34 -04:00
parent 01ab8267a6
commit bcbdc983a8
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class ScrewsTiltAdjust:
or (not is_clockwise_thread and self.direction == 'CCW'))
min_or_max = max if use_max else min
i_base, z_base = min_or_max(
enumerate([pos[2] for pos in positions]), key=lambda (i, z): z)
enumerate([pos[2] for pos in positions]), key=lambda v: v[1])
else:
# First screw is the base position used for comparison
i_base, z_base = 0, positions[0][2]