Skip to content

Commit 2748e0c

Browse files
committed
Fix pylint & black nits
(yeah I hate that 'not' one too but pylint demands it)
1 parent 644890e commit 2748e0c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

adafruit_pycamera/__init__.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
_OV5640_CMD_TRIGGER_AUTOFOCUS = const(0x03)
4949
_OV5640_CMD_AUTO_AUTOFOCUS = const(0x04)
5050
_OV5640_CMD_RELEASE_FOCUS = const(0x08)
51-
_OV5640_CMD_AF_SET_VCM_STEP = const(0x1a)
52-
_OV5640_CMD_AF_GET_VCM_STEP = const(0x1b)
51+
_OV5640_CMD_AF_SET_VCM_STEP = const(0x1A)
52+
_OV5640_CMD_AF_GET_VCM_STEP = const(0x1B)
5353

5454
_OV5640_CMD_MAIN = const(0x3022)
5555
_OV5640_CMD_ACK = const(0x3023)
@@ -498,14 +498,16 @@ def autofocus(self) -> list[int]:
498498
@property
499499
def autofocus_vcm_step(self):
500500
"""Get the voice coil motor step location"""
501-
if not self._send_autofocus_command(_OV5640_CMD_AF_GET_VCM_STEP, "get vcm step"):
501+
if not self._send_autofocus_command(
502+
_OV5640_CMD_AF_GET_VCM_STEP, "get vcm step"
503+
):
502504
return None
503505
return self.read_camera_register(_OV5640_CMD_PARA4)
504506

505507
@autofocus_vcm_step.setter
506508
def autofocus_vcm_step(self, step):
507509
"""Get the voice coil motor step location, from 0 to 255"""
508-
if not (0 <= step <= 255):
510+
if not 0 <= step <= 255:
509511
raise RuntimeError("VCM step must be 0 to 255")
510512
self.write_camera_register(_OV5640_CMD_PARA3, 0x00)
511513
self.write_camera_register(_OV5640_CMD_PARA4, step)

0 commit comments

Comments
 (0)