From 9fd84c6f84ce638420dbbdaac43a34e8945c748c Mon Sep 17 00:00:00 2001 From: Mario Ruiz Date: Fri, 25 Oct 2024 08:12:41 +0100 Subject: [PATCH] Flake8 --- npu/lib/applications/videoapps.py | 4 ++-- npu/utils/display_widget.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npu/lib/applications/videoapps.py b/npu/lib/applications/videoapps.py index 3855bbb..3a1d312 100644 --- a/npu/lib/applications/videoapps.py +++ b/npu/lib/applications/videoapps.py @@ -83,7 +83,7 @@ def _set_webcam_resolution(cap, height: int, width: int) -> bool: _ = cap.set(cv2.CAP_PROP_FRAME_WIDTH, width) _ = cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height) if width == int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) and \ - height == int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)): + height == int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)): return True return False @@ -101,7 +101,7 @@ def _set_supported_webcam_resolution(cap) -> bool: class VideoApplication: - """Wrapper class that allows to feed and visualize video stream from the NPU + """Class that allows to feed and visualize a video stream from the NPU You must pass an xclbin and optionally the pixel type for the input and output images. diff --git a/npu/utils/display_widget.py b/npu/utils/display_widget.py index 5f1cde5..0b1b9a5 100644 --- a/npu/utils/display_widget.py +++ b/npu/utils/display_widget.py @@ -17,7 +17,7 @@ class DisplayImage: _button_widget : widgets.Button reference to the button widget used to stop the video feed. exit : bool - set by the button widget and read by the display widget to step the video. + set by the button widget to stop the video feed """ def __init__(self): @@ -34,7 +34,7 @@ def _display(self) -> None: display(self._image_widget) def _stop_video(self, event=None) -> None: - """ On button press this function is called to set the exit attribute and stop the video """ + """ On button press this function stops the video feed""" self.exit = True self._button_widget.unobserve_all() self._button_widget.disabled = True