[{"id":22995,"web_url":"https://patchwork.libcamera.org/comment/22995/","msgid":"<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>","date":"2022-05-17T16:08:25","subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","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 Tue, May 17, 2022 at 05:33:18PM +0300, Tomi Valkeinen wrote:\n> Add some annotations and self.assertIsNotNone() calls to remove the\n> typechecker warnings.\n> \n> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n> ---\n>  test/py/unittests.py | 12 ++++++++++--\n>  1 file changed, 10 insertions(+), 2 deletions(-)\n> \n> diff --git a/test/py/unittests.py b/test/py/unittests.py\n> index 4c214f0a..2ea5ca35 100755\n> --- a/test/py/unittests.py\n> +++ b/test/py/unittests.py\n> @@ -10,6 +10,7 @@ import libcamera as libcam\n>  import os\n>  import selectors\n>  import time\n> +import typing\n>  import unittest\n>  import weakref\n>  \n> @@ -70,6 +71,9 @@ class SimpleTestMethods(BaseTestCase):\n>  \n>  \n>  class CameraTesterBase(BaseTestCase):\n> +    cm: typing.Any\n> +    cam: typing.Any\n> +\n>      def setUp(self):\n>          self.cm = libcam.CameraManager.singleton()\n>          self.cam = next((cam for cam in self.cm.cameras if 'platform/vimc' in cam.id), None)\n> @@ -131,6 +135,7 @@ class AllocatorTestMethods(CameraTesterBase):\n>          wr_allocator = weakref.ref(allocator)\n>  \n>          buffers = allocator.buffers(stream)\n> +        self.assertIsNotNone(buffers)\n>          buffers = None\n>  \n>          buffer = allocator.buffers(stream)[0]\n> @@ -166,6 +171,8 @@ class SimpleCaptureMethods(CameraTesterBase):\n>  \n>          streamconfig = camconfig.at(0)\n>          fmts = streamconfig.formats\n> +        self.assertIsNotNone(fmts)\n> +        fmts = None\n>  \n>          ret = cam.configure(camconfig)\n>          self.assertZero(ret)\n> @@ -225,6 +232,7 @@ class SimpleCaptureMethods(CameraTesterBase):\n>  \n>          streamconfig = camconfig.at(0)\n>          fmts = streamconfig.formats\n> +        self.assertIsNotNone(fmts)\n\nIs there a reason why there's no fmts = None here ? Apart from that,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>          ret = cam.configure(camconfig)\n>          self.assertZero(ret)\n> @@ -348,9 +356,9 @@ if __name__ == '__main__':\n>          gc.unfreeze()\n>          gc.collect()\n>  \n> -        obs_after = get_all_objects([obs_before])\n> +        obs_after = get_all_objects([obs_before])   # type: ignore\n>  \n> -        before = create_type_count_map(obs_before)\n> +        before = create_type_count_map(obs_before)  # type: ignore\n>          after = create_type_count_map(obs_after)\n>  \n>          leaks = diff_type_count_maps(before, after)","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 0A266C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 May 2022 16:08:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B26E665656;\n\tTue, 17 May 2022 18:08:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2D126041D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 May 2022 18:08:32 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [45.131.31.124])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F5E7484;\n\tTue, 17 May 2022 18:08:32 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652803714;\n\tbh=4i+vHJXnlGxSvE9rQTuko1Tkjgt3QiToDBfcPpMpR9I=;\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=oILCbUWgQQ3MNuxpB6fjUwH6zmhEMJBgb3mQFqsXd8aiQXLik6/oS28PlgGP4USpB\n\tN+KFlHoGF/m5XKBnrVIl99NC2uopqix0RyRj76IG7Dg9+coTERvFNXweao++/qWPyj\n\t+doNZfXFQCOLwy5iDJiZFNzxQTVLrDpPZ4QdSqwW5De7fVVIt/Mi2k/AMIyNv/t5cX\n\tqkmtdWBhd6JFXofvBdcq36OrkZBrSRpTJptZhgdm7yLIFlpTf4jxyMTyO5VkIKnd0a\n\tkiKdwHKXh4bR3gWeswFwgjC1VTdxhE9Z2osFlMJkb7vWlNlH6rQqbqJAmATaO/P8K2\n\tofNFNocy2UGog==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652803712;\n\tbh=4i+vHJXnlGxSvE9rQTuko1Tkjgt3QiToDBfcPpMpR9I=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bGpU6mjRGk52zEr0kSl/CO3sWrGBzOpuPkZrgTVhJoqCPA9mBiPenEe6v9Z/k+WIE\n\t0c8ENgasAM9VSv+6MzScEaMiCdUN3HQyJ8GcpB2NBtqoFAJ5/R+eZwFiIQtPoorcB3\n\tbCS8aN9bDzc2dHiEZ9aK+mThrL1LuiT9DKc4/0gQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bGpU6mjR\"; dkim-atps=neutral","Date":"Tue, 17 May 2022 19:08:25 +0300","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>","References":"<20220517143325.71784-1-tomi.valkeinen@ideasonboard.com>\n\t<20220517143325.71784-7-tomi.valkeinen@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220517143325.71784-7-tomi.valkeinen@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","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":23007,"web_url":"https://patchwork.libcamera.org/comment/23007/","msgid":"<165280628148.2416244.3500080509082035893@Monstersaurus>","date":"2022-05-17T16:51:21","subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2022-05-17 17:08:25)\n> Hi Tomi,\n> \n> Thank you for the patch.\n> \n> On Tue, May 17, 2022 at 05:33:18PM +0300, Tomi Valkeinen wrote:\n> > Add some annotations and self.assertIsNotNone() calls to remove the\n> > typechecker warnings.\n> > \n\nAre pyright and typechecker external commands that we need to introduce\nas part of our integration tests to verify commits now?\n\nAside from Laurent's question...\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n> > ---\n> >  test/py/unittests.py | 12 ++++++++++--\n> >  1 file changed, 10 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/test/py/unittests.py b/test/py/unittests.py\n> > index 4c214f0a..2ea5ca35 100755\n> > --- a/test/py/unittests.py\n> > +++ b/test/py/unittests.py\n> > @@ -10,6 +10,7 @@ import libcamera as libcam\n> >  import os\n> >  import selectors\n> >  import time\n> > +import typing\n> >  import unittest\n> >  import weakref\n> >  \n> > @@ -70,6 +71,9 @@ class SimpleTestMethods(BaseTestCase):\n> >  \n> >  \n> >  class CameraTesterBase(BaseTestCase):\n> > +    cm: typing.Any\n> > +    cam: typing.Any\n> > +\n> >      def setUp(self):\n> >          self.cm = libcam.CameraManager.singleton()\n> >          self.cam = next((cam for cam in self.cm.cameras if 'platform/vimc' in cam.id), None)\n> > @@ -131,6 +135,7 @@ class AllocatorTestMethods(CameraTesterBase):\n> >          wr_allocator = weakref.ref(allocator)\n> >  \n> >          buffers = allocator.buffers(stream)\n> > +        self.assertIsNotNone(buffers)\n> >          buffers = None\n> >  \n> >          buffer = allocator.buffers(stream)[0]\n> > @@ -166,6 +171,8 @@ class SimpleCaptureMethods(CameraTesterBase):\n> >  \n> >          streamconfig = camconfig.at(0)\n> >          fmts = streamconfig.formats\n> > +        self.assertIsNotNone(fmts)\n> > +        fmts = None\n> >  \n> >          ret = cam.configure(camconfig)\n> >          self.assertZero(ret)\n> > @@ -225,6 +232,7 @@ class SimpleCaptureMethods(CameraTesterBase):\n> >  \n> >          streamconfig = camconfig.at(0)\n> >          fmts = streamconfig.formats\n> > +        self.assertIsNotNone(fmts)\n> \n> Is there a reason why there's no fmts = None here ? Apart from that,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> >  \n> >          ret = cam.configure(camconfig)\n> >          self.assertZero(ret)\n> > @@ -348,9 +356,9 @@ if __name__ == '__main__':\n> >          gc.unfreeze()\n> >          gc.collect()\n> >  \n> > -        obs_after = get_all_objects([obs_before])\n> > +        obs_after = get_all_objects([obs_before])   # type: ignore\n> >  \n> > -        before = create_type_count_map(obs_before)\n> > +        before = create_type_count_map(obs_before)  # type: ignore\n> >          after = create_type_count_map(obs_after)\n> >  \n> >          leaks = diff_type_count_maps(before, after)\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 78BF6C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 May 2022 16:51:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BA0A865656;\n\tTue, 17 May 2022 18:51:25 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6BC5F6041D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 May 2022 18:51:24 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CF5E74A8;\n\tTue, 17 May 2022 18:51:23 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652806285;\n\tbh=Uj9pfcDI2M0xto5/IWyq4E6grGOrmwRKeqXWwRIsVUo=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=vBQYfuGy8tTRHOJU1eEkMcZFjT6yNdfJgkXv16OKHgIlDODyA45ERkuLBJCClw1kg\n\t6mnpBzmQABtdS59hQz9PerogXspYYJS3K990eTEN995Uxrgf4zURTOa1Xvx8z0KbVw\n\tEJjIsHOhu8LHvGD/ugMW5LY+WXIWP0UqPnUVTWTl/sIW+Z8fxoBw8V3nyPn7Mgy7Dg\n\tj4V0snJHxMnR4M+MGMfQ8SxC1wZU5Xw2PmNWUwRmVCUUytU8IZy3HWOMTzTM5auM8r\n\tlHDHlueUBbJ7lx5bPXeqDm9OL8ZS5OWT/p049hmjoccRt65846QU9e8EdchS90B5Ld\n\tEDbcgSiMF2grg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652806283;\n\tbh=Uj9pfcDI2M0xto5/IWyq4E6grGOrmwRKeqXWwRIsVUo=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=METAMCc/v51TiFFM9ddlceRH8RNvu978+GIy1N1HE/HLjJ7DFNBoi/L5sOCVTE4qb\n\tMIw+d4tw0Rny7c8TeBjQc3+iEGKGevFcUsK8a9jpvUlJsXy2UEkyLX8E6T90CUHMM1\n\t2r9NTuqgBFyTaqWDeNTG9Zn5SaNFY8tzDBdpsZhk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"METAMCc/\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>","References":"<20220517143325.71784-1-tomi.valkeinen@ideasonboard.com>\n\t<20220517143325.71784-7-tomi.valkeinen@ideasonboard.com>\n\t<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tTomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Date":"Tue, 17 May 2022 17:51:21 +0100","Message-ID":"<165280628148.2416244.3500080509082035893@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@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":23028,"web_url":"https://patchwork.libcamera.org/comment/23028/","msgid":"<41393533-1ef7-88c1-24dc-c45dc6f10e69@ideasonboard.com>","date":"2022-05-18T06:46:33","subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 17/05/2022 19:08, Laurent Pinchart wrote:\n> Hi Tomi,\n> \n> Thank you for the patch.\n> \n> On Tue, May 17, 2022 at 05:33:18PM +0300, Tomi Valkeinen wrote:\n>> Add some annotations and self.assertIsNotNone() calls to remove the\n>> typechecker warnings.\n>>\n>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n>> ---\n>>   test/py/unittests.py | 12 ++++++++++--\n>>   1 file changed, 10 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/test/py/unittests.py b/test/py/unittests.py\n>> index 4c214f0a..2ea5ca35 100755\n>> --- a/test/py/unittests.py\n>> +++ b/test/py/unittests.py\n>> @@ -10,6 +10,7 @@ import libcamera as libcam\n>>   import os\n>>   import selectors\n>>   import time\n>> +import typing\n>>   import unittest\n>>   import weakref\n>>   \n>> @@ -70,6 +71,9 @@ class SimpleTestMethods(BaseTestCase):\n>>   \n>>   \n>>   class CameraTesterBase(BaseTestCase):\n>> +    cm: typing.Any\n>> +    cam: typing.Any\n>> +\n>>       def setUp(self):\n>>           self.cm = libcam.CameraManager.singleton()\n>>           self.cam = next((cam for cam in self.cm.cameras if 'platform/vimc' in cam.id), None)\n>> @@ -131,6 +135,7 @@ class AllocatorTestMethods(CameraTesterBase):\n>>           wr_allocator = weakref.ref(allocator)\n>>   \n>>           buffers = allocator.buffers(stream)\n>> +        self.assertIsNotNone(buffers)\n>>           buffers = None\n>>   \n>>           buffer = allocator.buffers(stream)[0]\n>> @@ -166,6 +171,8 @@ class SimpleCaptureMethods(CameraTesterBase):\n>>   \n>>           streamconfig = camconfig.at(0)\n>>           fmts = streamconfig.formats\n>> +        self.assertIsNotNone(fmts)\n>> +        fmts = None\n>>   \n>>           ret = cam.configure(camconfig)\n>>           self.assertZero(ret)\n>> @@ -225,6 +232,7 @@ class SimpleCaptureMethods(CameraTesterBase):\n>>   \n>>           streamconfig = camconfig.at(0)\n>>           fmts = streamconfig.formats\n>> +        self.assertIsNotNone(fmts)\n> \n> Is there a reason why there's no fmts = None here ? Apart from that,\n\nNo, I can add it.\n\n  Tomi","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 35988C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 May 2022 06:46:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78C1A65656;\n\tWed, 18 May 2022 08:46:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 038AE60422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 May 2022 08:46:36 +0200 (CEST)","from [192.168.1.111] (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 497B448F;\n\tWed, 18 May 2022 08:46:36 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652856398;\n\tbh=TqLmb6jH6XkqgGrIqRXDfWIJ/XEhjJB7PfDk5+HZT5g=;\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=ZLHi8+kaj2r+mDbtm6ECxrO5n/N0xRpxNA55exSjUC6lccQw3rFQ/nOwdST4vky4e\n\tBEh1tY7zrQLU8VEjnHY6RsjUq7hWcZqBx3VPWehuU8aM3COBkKPY2f1J5in04mXgRO\n\tEJ4soce1tmOOga4jXEAq13Er34tLllJTqjRXUJzlvZ/20u1vUBWsGZrvy9F+zbtVjo\n\taxGkz9DusiGeTYloA9CHbD7/d75tlYdxI3LLgUfa10Y0/AB+HvdjOkovqzhh8ur4qY\n\twxxlQsAxrK8riDUI+f7elKGmbpb1iGW+IZ8+JHbsfmGTChH7j22Moa7bBxLh6Zkm9M\n\tiGJV2m+HzaBvw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652856396;\n\tbh=TqLmb6jH6XkqgGrIqRXDfWIJ/XEhjJB7PfDk5+HZT5g=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=l6N4vjQHQmlxD26uH0So8fQzbf58/VbKMd+X2a+aTH0Qlg/JNcb1IjzCgbSa1PdhC\n\tisv9Pmqmq++v0DjZic82MJOjJQF1Hfau6ITtpqrAjJcDZ4exZVu7e9KxoDpuBItZAm\n\trXbg6zhmeVR5J6/V4gPAJNx70640FCgn0wrQfzXs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"l6N4vjQH\"; dkim-atps=neutral","Message-ID":"<41393533-1ef7-88c1-24dc-c45dc6f10e69@ideasonboard.com>","Date":"Wed, 18 May 2022 09:46:33 +0300","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.8.0","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20220517143325.71784-1-tomi.valkeinen@ideasonboard.com>\n\t<20220517143325.71784-7-tomi.valkeinen@ideasonboard.com>\n\t<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>","In-Reply-To":"<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","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>"}},{"id":23029,"web_url":"https://patchwork.libcamera.org/comment/23029/","msgid":"<6ed8271a-3781-8e14-4ea5-b31d9ef16a4c@ideasonboard.com>","date":"2022-05-18T06:51:27","subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 17/05/2022 19:51, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2022-05-17 17:08:25)\n>> Hi Tomi,\n>>\n>> Thank you for the patch.\n>>\n>> On Tue, May 17, 2022 at 05:33:18PM +0300, Tomi Valkeinen wrote:\n>>> Add some annotations and self.assertIsNotNone() calls to remove the\n>>> typechecker warnings.\n>>>\n> \n> Are pyright and typechecker external commands that we need to introduce\n> as part of our integration tests to verify commits now?\n\npyright is the typechecker I use, or my editor uses. I'm not familiar \nwith the internals, seems to be some horrible contraption with node.js \nand whatnots...\n\nA Python static typechecker to verify the commits would be nice, \nalthough at least pyright seems to complain about lots of unnecessary \nthings. But I presume adjusting the settings would give us something \nusable. I have to admit I'm pretty clueless about those, though.\n\n  Tomi","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 DAF36C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 May 2022 06:51:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3368365656;\n\tWed, 18 May 2022 08:51:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9504060422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 May 2022 08:51:30 +0200 (CEST)","from [192.168.1.111] (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D24D548F;\n\tWed, 18 May 2022 08:51:29 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652856692;\n\tbh=RcZGFyF7rAcHK5uEyl1y4jrRwQt4DHNTv3DcmmtlZcE=;\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=zBFoD8rRywv4jRtymIZUp36OWFCJGWLw+NJfMN3pBzdPWBb/cngIE8F4c/IpLd7XO\n\ttq/zSTionM6f7/gJcPsViMbn8QhQ1FusHYQswCu9Zmy7lgKOeEI0VzzYK4AP+LRc9p\n\teDebdqXvEkZ+8FCd2g2jeXQ3+XLry2l/3a51dp49Y4wr8lJQItFC1ovKi1rMNwcTsO\n\t5MXLaY9emAZXf4Rpj1x6oG5GdnSHDEsIOUTIPbwACrrqeobxu6Tm1+Og7X0EV5eENN\n\tnXIAbjp7AHz7vARqE1ddlbaHygBiHY/L+c0L094SWiiaw+15WJIxQnQ2IoCt2/1BCH\n\tViXvw/YXvEppA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652856690;\n\tbh=RcZGFyF7rAcHK5uEyl1y4jrRwQt4DHNTv3DcmmtlZcE=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=nOLP4GxjJEM2t7Hd6cFJ3aFLZ1C50gx5l60ZzkUYpxhXFVleZO/NoL8KzaJEBSgeX\n\tJw5/pfLuYbUfmNkYmKANRpUj99AzU5iDoTYJEex/jD3tylz2QvQom+3qNTJvbPmMN+\n\tIafR0hXXaEGn9amrGwSfUVs0+bBRdoVH3sH3nKhM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"nOLP4Gxj\"; dkim-atps=neutral","Message-ID":"<6ed8271a-3781-8e14-4ea5-b31d9ef16a4c@ideasonboard.com>","Date":"Wed, 18 May 2022 09:51:27 +0300","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.8.0","Content-Language":"en-US","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20220517143325.71784-1-tomi.valkeinen@ideasonboard.com>\n\t<20220517143325.71784-7-tomi.valkeinen@ideasonboard.com>\n\t<YoPIeRqifQtcyRJe@pendragon.ideasonboard.com>\n\t<165280628148.2416244.3500080509082035893@Monstersaurus>","In-Reply-To":"<165280628148.2416244.3500080509082035893@Monstersaurus>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 06/13] py: unittests: make\n\ttypechecker happy","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>"}}]