Skip to content

Commit f696aaf

Browse files
committed
run linter
1 parent a050d44 commit f696aaf

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/arduino/app_peripherals/camera/websocket_camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ def _close_camera(self):
249249
future = asyncio.run_coroutine_threadsafe(self._set_async_stop_event(), self._loop)
250250
try:
251251
future.result(timeout=1.0)
252-
except CancelledError as e:
252+
except CancelledError:
253253
logger.debug(f"Error setting async stop event: CancelledError")
254-
except TimeoutError as e:
254+
except TimeoutError:
255255
logger.debug(f"Error setting async stop event: TimeoutError")
256256
except Exception as e:
257257
logger.warning(f"Error setting async stop event: {e}")

src/arduino/app_peripherals/usb_camera/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import io
66
import warnings
77
from PIL import Image
8-
from arduino.app_peripherals.camera import Camera, CameraReadError as CRE, CameraOpenError as COE
8+
from arduino.app_peripherals.camera import Camera as Camera, CameraReadError as CRE, CameraOpenError as COE
99
from arduino.app_peripherals.camera.v4l_camera import V4LCamera
1010
from arduino.app_utils.image import letterboxed, compressed_to_png
1111
from arduino.app_utils import Logger

src/arduino/app_utils/image/adjustments.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ def letterboxed(target_size: Optional[Tuple[int, int]] = None, color: Tuple[int,
333333
Args:
334334
target_size (tuple, optional): Target size as (width, height). If None, makes frame square.
335335
color (tuple): RGB color for padding borders. Default: (114, 114, 114)
336+
interpolation (int): OpenCV interpolation method. Default: cv2.INTER_LINEAR
336337
337338
Returns:
338339
Partial function that takes a frame and returns letterboxed frame
@@ -351,7 +352,7 @@ def resized(target_size: Tuple[int, int], maintain_ratio: bool = False, interpol
351352
Args:
352353
target_size (tuple): Target size as (width, height)
353354
maintain_ratio (bool): If True, use letterboxing to maintain aspect ratio
354-
interpolation (int): OpenCV interpolation method
355+
interpolation (int): OpenCV interpolation method. Default: cv2.INTER_LINEAR
355356
356357
Returns:
357358
Partial function that takes a frame and returns resized frame

src/arduino/app_utils/image/pipeable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __repr__(self):
8686
if func_name is None:
8787
from functools import partial
8888

89-
if type(self.func) == partial:
89+
if type(self.func) is partial:
9090
func_name = "partial"
9191
if func_name is None:
9292
func_name = "unknown" # Fallback

tests/arduino/app_bricks/objectdetection/test_objectdetection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
import pytest
66
from pathlib import Path
7-
import io
8-
from PIL import Image
97
from arduino.app_bricks.object_detection import ObjectDetection
108

119

0 commit comments

Comments
 (0)