Skip to content

Commit aee98b4

Browse files
committed
autoformat with black
1 parent 9105915 commit aee98b4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

adafruit_vl53l0x.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def do_range_measurement(self):
553553
):
554554
raise RuntimeError("Timeout waiting for VL53L0X!")
555555

556-
def read_range(self, max_ready_wait_us = None):
556+
def read_range(self, max_ready_wait_us=None):
557557
"""Return a range reading in millimeters.
558558
559559
If max_ready_wait_us is specified, and the sensor data is not ready
@@ -573,7 +573,10 @@ def read_range(self, max_ready_wait_us = None):
573573
and (time.monotonic() - start) >= self.io_timeout_s
574574
):
575575
raise RuntimeError("Timeout waiting for VL53L0X!")
576-
if max_ready_wait_us is not None and (time.monotonic() - start)*1_000_000 >= max_ready_wait_us:
576+
if (
577+
max_ready_wait_us is not None
578+
and (time.monotonic() - start) * 1_000_000 >= max_ready_wait_us
579+
):
577580
return -1
578581
# assumptions: Linearity Corrective Gain is 1000 (default)
579582
# fractional ranging is not enabled

0 commit comments

Comments
 (0)