[{"id":27235,"web_url":"https://patchwork.libcamera.org/comment/27235/","msgid":"<20230604130950.GA7754@pendragon.ideasonboard.com>","date":"2023-06-04T13:09:50","subject":"Re: [libcamera-devel] [PATCH v5 12/13] py: unittests.py: Fix type\n\tchecker warnings","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomi,\n\nThank you for the patch.\n\nOn Sat, Jun 03, 2023 at 10:56:14AM +0300, Tomi Valkeinen wrote:\n> Fix type checker warnings by dropping unused imports and using _ for\n> variable names that are not used.\n> \n> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nAs this is a fix, I'll move it to the bottom of the series and apply it\nalready.\n\n> ---\n>  test/py/unittests.py | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n> \n> diff --git a/test/py/unittests.py b/test/py/unittests.py\n> index 024d9752..967e791f 100755\n> --- a/test/py/unittests.py\n> +++ b/test/py/unittests.py\n> @@ -4,11 +4,9 @@\n>  # Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n>  \n>  from collections import defaultdict\n> -import errno\n>  import gc\n>  import libcamera as libcam\n>  import selectors\n> -import time\n>  import typing\n>  import unittest\n>  import weakref\n> @@ -410,7 +408,7 @@ class SimpleCaptureMethods(CameraTesterBase):\n>          running = True\n>          while running:\n>              events = sel.select()\n> -            for key, _ in events:\n> +            for _ in events:\n>                  for ev in cm.get_events():\n>                      self.assertEqual(ev.type, libcam.Event.Type.RequestCompleted)\n>                      reqs.append(ev.request)","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C5249C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  4 Jun 2023 13:09:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 16CAD62754;\n\tSun,  4 Jun 2023 15:09:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8570A62720\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  4 Jun 2023 15:09:51 +0200 (CEST)","from pendragon.ideasonboard.com (om126166129043.28.openmobile.ne.jp\n\t[126.166.129.43])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7EA982CF;\n\tSun,  4 Jun 2023 15:09:26 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685884193;\n\tbh=NEF+Gp3B3BQQVlTMQdU0vqoWwKM0p4KpjCpuWVDJJic=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=TLoN/IwcLNNbj9TQJRzQ/8RxGUOJJvnZlXd6NEih2Ql8YrgNiJVgcKkgMEn7oscm+\n\tLkq/GaPIwEM+LqiZRDTEoKbdlvsKwqtF2DitLrMPkx69FdOBDRgP3vL2zPmLf/CjNu\n\tpYHdiaZo5/2jKx6XCGlnF1iNuqXalotqUt05oNiRoU6LWRE9XcBTblamnQUBIqjmZa\n\tAqhJ/DlKOjlxMmLfCc94SBvLnDHoo7JPB7Welbc8nlnt2wI0CzF3pwZb5B3VfxNXzr\n\t2pFYrbax3/aV01dO6TdINdcsxoRZKYGoSM3M/eVyXhki3PI+Y/FrE+n5l9b4sTgqFc\n\tI4+uttbndsTWA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1685884167;\n\tbh=NEF+Gp3B3BQQVlTMQdU0vqoWwKM0p4KpjCpuWVDJJic=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aLgHqu0Q2ORKy6setWPFtlkElkE9huYN6qAip2ptGGEJNM/zIyT4M8OM6IwJKXEwt\n\tAPeVXlmdulStwAIfXuREBCqWZiXs7SSh1usthI3uG9uWYG0nWWRadsHD/VWA8We1ol\n\tOoay2pGxKaHomrRaRR4J+GBh25Kot/jjop7WRJnU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"aLgHqu0Q\"; dkim-atps=neutral","Date":"Sun, 4 Jun 2023 16:09:50 +0300","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<20230604130950.GA7754@pendragon.ideasonboard.com>","References":"<20230603075615.20663-1-tomi.valkeinen@ideasonboard.com>\n\t<20230603075615.20663-13-tomi.valkeinen@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230603075615.20663-13-tomi.valkeinen@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 12/13] py: unittests.py: Fix type\n\tchecker warnings","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27236,"web_url":"https://patchwork.libcamera.org/comment/27236/","msgid":"<df53c965-a5a4-c32f-fb3a-7ee171aa254c@ideasonboard.com>","date":"2023-06-04T13:15:05","subject":"Re: [libcamera-devel] [PATCH v5 12/13] py: unittests.py: Fix type\n\tchecker warnings","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 04/06/2023 16:09, Laurent Pinchart wrote:\n> Hi Tomi,\n> \n> Thank you for the patch.\n> \n> On Sat, Jun 03, 2023 at 10:56:14AM +0300, Tomi Valkeinen wrote:\n>> Fix type checker warnings by dropping unused imports and using _ for\n>> variable names that are not used.\n>>\n>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> As this is a fix, I'll move it to the bottom of the series and apply it\n> already.\n\nIt probably conflicts with the event change patches, and it doesn't fix \nany functionality. So, up to you, but possibly not worth reordering.\n\n  Tomi\n\n>> ---\n>>   test/py/unittests.py | 4 +---\n>>   1 file changed, 1 insertion(+), 3 deletions(-)\n>>\n>> diff --git a/test/py/unittests.py b/test/py/unittests.py\n>> index 024d9752..967e791f 100755\n>> --- a/test/py/unittests.py\n>> +++ b/test/py/unittests.py\n>> @@ -4,11 +4,9 @@\n>>   # Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n>>   \n>>   from collections import defaultdict\n>> -import errno\n>>   import gc\n>>   import libcamera as libcam\n>>   import selectors\n>> -import time\n>>   import typing\n>>   import unittest\n>>   import weakref\n>> @@ -410,7 +408,7 @@ class SimpleCaptureMethods(CameraTesterBase):\n>>           running = True\n>>           while running:\n>>               events = sel.select()\n>> -            for key, _ in events:\n>> +            for _ in events:\n>>                   for ev in cm.get_events():\n>>                       self.assertEqual(ev.type, libcam.Event.Type.RequestCompleted)\n>>                       reqs.append(ev.request)\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BE66AC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  4 Jun 2023 13:15:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2521262754;\n\tSun,  4 Jun 2023 15:15:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7A62262720\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  4 Jun 2023 15:15:09 +0200 (CEST)","from [192.168.88.20] (91-154-35-171.elisa-laajakaista.fi\n\t[91.154.35.171])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 22ACF2CF;\n\tSun,  4 Jun 2023 15:14:45 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685884510;\n\tbh=hMELmvckoxWo1EKgcZGHuTHX1Uzb5drwUb+V+BhQGOc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=r6MjerScQsEG2Lx4u6A46YLi1xAeQetZ2R4a6VYA5RK+k4P7omDMUnnjzY6oH1Ayj\n\t1MUkbTtnZHFK2mzNUPTyjQY3KKfJZ2qbf1J5YhgkhfjxEfMoImhzCgIVspZRc7vuMP\n\tQiw/1AEu0tu3mUWBPqPaXI7Dp+L/5jep42n9nqlzSWmBJX2EsWzNmYQZA8idUVExBV\n\t5ad19dDIaQxQEsXMJCv/ZX4wjjdbzS8A65O6vTxASjbd0c+qaDcjdjHCR8IjA/Zd5A\n\tewiwwO6b/UcpW0skvxGlPzYMwSiaHVGdbP6q5RaF+5JDNBuyw9DwWocyT62UafVkPW\n\t5wIlg7iHT91Sg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1685884485;\n\tbh=hMELmvckoxWo1EKgcZGHuTHX1Uzb5drwUb+V+BhQGOc=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=oMbjTbkcjMDIYcFe0hXon6oxElB43PSohffg9d5EcphTTch8JiT+DotQ4hXhyd1PF\n\tNGBKR2uQUOrxsQplsKpr8QP/uSgIqDBYk2wppWEHJwYEfHlMZUV+kzAKRNmDhzTMgf\n\tlFO8M32PJX5AAOkZxGp0O2TfEGEPRZ0MiyZvw0lM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"oMbjTbkc\"; dkim-atps=neutral","Message-ID":"<df53c965-a5a4-c32f-fb3a-7ee171aa254c@ideasonboard.com>","Date":"Sun, 4 Jun 2023 16:15:05 +0300","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.11.0","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20230603075615.20663-1-tomi.valkeinen@ideasonboard.com>\n\t<20230603075615.20663-13-tomi.valkeinen@ideasonboard.com>\n\t<20230604130950.GA7754@pendragon.ideasonboard.com>","In-Reply-To":"<20230604130950.GA7754@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v5 12/13] py: unittests.py: Fix type\n\tchecker warnings","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]