Skip to content

Commit

Permalink
Flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
mariodruiz committed Oct 25, 2024
1 parent 67d85ac commit 9fd84c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions npu/lib/applications/videoapps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions npu/utils/display_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down

0 comments on commit 9fd84c6

Please sign in to comment.