Skip to content

Commit 1a2684e

Browse files
committed
black and flake8
1 parent d0847cd commit 1a2684e

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

modules/camera/camera_arducamir.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@ class CameraArducamIR(base_camera.BaseCameraDevice):
3030
__create_key = object()
3131

3232
@classmethod
33-
def create(cls, width: int, height: int, config: None) -> "tuple[True, CameraArducamIR] | tuple[False, None]":
33+
def create(
34+
cls, width: int, height: int, config: None
35+
) -> "tuple[True, CameraArducamIR] | tuple[False, None]":
3436
# TODO: Do I need a create() function, if there are no invalid inputs?
3537

3638
camera = Camera()
3739

3840
return True, CameraArducamIR(cls.__create_key, camera, width, height, config)
3941

40-
def __init__(self, class_private_create_key: object, camera: ArducamEvkSDK.Camera, width: int, height: int, config:None) -> None:
42+
def __init__(
43+
self,
44+
class_private_create_key: object,
45+
camera: ArducamEvkSDK.Camera,
46+
width: int,
47+
height: int,
48+
config: None,
49+
) -> None:
4150
"""
4251
Private constructor, use create() method.
4352
"""

tests/integration/test_camera_arducamir.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Test ArducamIR camera physically and verifies configuration
33
"""
4+
45
import time
56

67
import cv2
@@ -34,11 +35,11 @@ def main() -> int:
3435
continue
3536

3637
if image.seq % 50 == 0: # Avoiding too many prints, 50 is an arbitrary number
37-
print(f"Timestamp: [{0:s}]",time.ctime(float(image.timestamp / 10**3)))
38-
print("Bit Depth: {0:2d}",image.format.bit_depth)
39-
print("Format Code: {0:2d}",image.format.format_code)
40-
print("Height: {0:3d}",image.format.height)
41-
print("Width: {0:3d}\n",image.format.width)
38+
print(f"Timestamp: [{0:s}]", time.ctime(float(image.timestamp / 10**3)))
39+
print("Bit Depth: {0:2d}", image.format.bit_depth)
40+
print("Format Code: {0:2d}", image.format.format_code)
41+
print("Height: {0:3d}", image.format.height)
42+
print("Width: {0:3d}\n", image.format.width)
4243

4344
# Assertions for Arducam cfg config values
4445
assert image.format.bit_depth == 12

0 commit comments

Comments
 (0)