24
24
https://github.com/adafruit/circuitpython/releases
25
25
"""
26
26
27
- # pylint: disable=too-many-lines
28
- # pylint: disable=too-many-public-methods
29
27
# imports
30
28
import time
31
29
@@ -955,7 +953,7 @@ def __set__(self, obj: "OV5640", value: int) -> None:
955
953
obj ._write_register16 (self .reg , reg_value )
956
954
957
955
958
- class _SCCB16CameraBase : # pylint: disable=too-few-public-methods
956
+ class _SCCB16CameraBase :
959
957
_finalize_firmware_load = (
960
958
0x3022 ,
961
959
0x00 ,
@@ -1029,7 +1027,7 @@ def _write_reg_bits(self, reg: int, mask: int, enable: bool) -> None:
1029
1027
self ._write_register (reg , val )
1030
1028
1031
1029
1032
- class OV5640 (_SCCB16CameraBase ): # pylint: disable=too-many-instance-attributes
1030
+ class OV5640 (_SCCB16CameraBase ):
1033
1031
"""Control & Capture Images from an OV5640 Camera"""
1034
1032
1035
1033
def __init__ (
@@ -1046,7 +1044,7 @@ def __init__(
1046
1044
i2c_address : int = 0x3C ,
1047
1045
size : int = OV5640_SIZE_QQVGA ,
1048
1046
init_autofocus : bool = True ,
1049
- ): # pylint: disable=too-many-arguments
1047
+ ):
1050
1048
"""
1051
1049
Args:
1052
1050
i2c_bus (busio.I2C): The I2C bus used to configure the OV5640
@@ -1169,7 +1167,7 @@ def autofocus_status(self):
1169
1167
"""Read the camera autofocus status register"""
1170
1168
return self ._read_register (_OV5640_CMD_FW_STATUS )
1171
1169
1172
- def _send_autofocus_command (self , command , msg ): # pylint: disable=unused-argument
1170
+ def _send_autofocus_command (self , command , msg ):
1173
1171
self ._write_register (_OV5640_CMD_ACK , 0x01 ) # clear command ack
1174
1172
self ._write_register (_OV5640_CMD_MAIN , command ) # send command
1175
1173
for _ in range (1000 ):
@@ -1260,7 +1258,7 @@ def colorspace(self, colorspace: int) -> None:
1260
1258
self ._colorspace = colorspace
1261
1259
self ._set_size_and_colorspace ()
1262
1260
1263
- def _set_image_options (self ) -> None : # pylint: disable=too-many-branches
1261
+ def _set_image_options (self ) -> None :
1264
1262
reg20 = reg21 = reg4514 = reg4514_test = 0
1265
1263
if self .colorspace == OV5640_COLOR_JPEG :
1266
1264
reg21 |= 0x20
@@ -1331,7 +1329,7 @@ def size(self) -> int:
1331
1329
"""Get or set the captured image size, one of the ``OV5640_SIZE_`` constants."""
1332
1330
return self ._size
1333
1331
1334
- def _set_size_and_colorspace (self ) -> None : # pylint: disable=too-many-locals
1332
+ def _set_size_and_colorspace (self ) -> None :
1335
1333
size = self ._size
1336
1334
width , height , ratio = _resolution_info [size ]
1337
1335
self ._w = width
@@ -1385,7 +1383,7 @@ def _set_size_and_colorspace(self) -> None: # pylint: disable=too-many-locals
1385
1383
1386
1384
self ._set_colorspace ()
1387
1385
1388
- def _set_pll ( # pylint: disable=too-many-arguments
1386
+ def _set_pll (
1389
1387
self ,
1390
1388
bypass : bool ,
1391
1389
multiplier : int ,
@@ -1396,7 +1394,7 @@ def _set_pll( # pylint: disable=too-many-arguments
1396
1394
pclk_manual : bool ,
1397
1395
pclk_div : int ,
1398
1396
) -> None :
1399
- if ( # pylint: disable=too-many-boolean-expressions
1397
+ if (
1400
1398
multiplier > 252
1401
1399
or multiplier < 4
1402
1400
or sys_div > 15
0 commit comments