[libcamera-devel,v4,12/15] py: unittests.py: Fix type checker warnings
diff mbox series

Message ID 20230309142601.70556-13-tomi.valkeinen@ideasonboard.com
State Accepted
Headers show
Series
  • py: New python bindings event handling
Related show

Commit Message

Tomi Valkeinen March 9, 2023, 2:25 p.m. UTC
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 test/py/unittests.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Laurent Pinchart March 12, 2023, 3:05 p.m. UTC | #1
Hi Tomi,

Thank you for the patch.

On Thu, Mar 09, 2023 at 04:25:58PM +0200, Tomi Valkeinen via libcamera-devel wrote:

Please add a commit message.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
>  test/py/unittests.py | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/test/py/unittests.py b/test/py/unittests.py
> index b52b3391..9fd8730e 100755
> --- a/test/py/unittests.py
> +++ b/test/py/unittests.py
> @@ -4,11 +4,9 @@
>  # Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>  
>  from collections import defaultdict
> -import errno
>  import gc
>  import libcamera as libcam
>  import selectors
> -import time
>  import typing
>  import unittest
>  import weakref
> @@ -406,7 +404,7 @@ class SimpleCaptureMethods(CameraTesterBase):
>          running = True
>          while running:
>              events = sel.select()
> -            for key, _ in events:
> +            for _ in events:
>                  for ev in cm.get_events():
>                      self.assertEqual(ev.type, libcam.Event.Type.RequestCompleted)
>                      reqs.append(ev.request)

Patch
diff mbox series

diff --git a/test/py/unittests.py b/test/py/unittests.py
index b52b3391..9fd8730e 100755
--- a/test/py/unittests.py
+++ b/test/py/unittests.py
@@ -4,11 +4,9 @@ 
 # Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
 
 from collections import defaultdict
-import errno
 import gc
 import libcamera as libcam
 import selectors
-import time
 import typing
 import unittest
 import weakref
@@ -406,7 +404,7 @@  class SimpleCaptureMethods(CameraTesterBase):
         running = True
         while running:
             events = sel.select()
-            for key, _ in events:
+            for _ in events:
                 for ev in cm.get_events():
                     self.assertEqual(ev.type, libcam.Event.Type.RequestCompleted)
                     reqs.append(ev.request)