Patch Detail
Show a patch.
GET /api/1.1/patches/15957/?format=api
{ "id": 15957, "url": "https://patchwork.libcamera.org/api/1.1/patches/15957/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15957/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220518131329.66994-8-tomi.valkeinen@ideasonboard.com>", "date": "2022-05-18T13:13:18", "name": "[libcamera-devel,v3,07/18] py: unittests: make typechecker happy", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "afa31630f21eeaa8567898e26543185a4ec5a2b8", "submitter": { "id": 109, "url": "https://patchwork.libcamera.org/api/1.1/people/109/?format=api", "name": "Tomi Valkeinen", "email": "tomi.valkeinen@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15957/mbox/", "series": [ { "id": 3122, "url": "https://patchwork.libcamera.org/api/1.1/series/3122/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3122", "date": "2022-05-18T13:13:11", "name": "Misc Python bindings patches", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3122/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15957/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15957/checks/", "tags": {}, "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 E375CC326E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 May 2022 13:14:01 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 674DA65671;\n\tWed, 18 May 2022 15:13:59 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 060AA65662\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 May 2022 15:13:50 +0200 (CEST)", "from deskari.lan (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 672DB1C19;\n\tWed, 18 May 2022 15:13:49 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652879639;\n\tbh=2Gh0dNLUngxfQES1Wrqv7GwQjtiauyJZZwFH21iSIM0=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=B5y2nZeN06WF2m/QzN2bKcSJm8Vj0QJBHCNM5DgLRZtkltjuBlQJiUlgNZD8/NG4Q\n\taR9FcCFXXHSRzZnFXvn3bp/Sn2wkygmKLuQwk6uSkLqUAxpkzGt2HOBDrc7zMJBZjf\n\txNBEz8tUu5PywIyi7yFPzSDq2UqEiWQzO1tdQUn6B6cFkFFaZM28FQoFIv6zYhHUxd\n\tC+iR/ETBEm8QCYJa3DTUjQY1w6n6eYvGx2QrKJnCehsb7wSngw8ugyLzMjw+y/4dDn\n\t80Pbz5ZH0nr78k+gVj+mExcLHKi/shICRo27QGaI513O/cyerP2rsItvHqYk85cJD6\n\tC3uB5kEhCemWA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652879629;\n\tbh=2Gh0dNLUngxfQES1Wrqv7GwQjtiauyJZZwFH21iSIM0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lBnAv0C4Nf/3wQYb9gUe6tKcQhRfFKtviDeiS0dkKOTTdimAati1p93YGU9FJ67IO\n\tltr2SCF43IouZlQxz4QqweAGEaUKSqXn7aKVmZpQm4vy79a/P6/3mn7tmFqs7JLXcD\n\tf01YBCtVZKKJKsv2HG5V0cEpf9EFgUM4pnXZ4O5I=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lBnAv0C4\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>", "Date": "Wed, 18 May 2022 16:13:18 +0300", "Message-Id": "<20220518131329.66994-8-tomi.valkeinen@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220518131329.66994-1-tomi.valkeinen@ideasonboard.com>", "References": "<20220518131329.66994-1-tomi.valkeinen@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 07/18] py: unittests: make typechecker\n\thappy", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add some annotations and self.assertIsNotNone() calls to remove the\ntypechecker warnings.\n\nSigned-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/py/unittests.py | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)", "diff": "diff --git a/test/py/unittests.py b/test/py/unittests.py\nindex 4c214f0a..7dede33b 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,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@@ -348,9 +357,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", "prefixes": [ "libcamera-devel", "v3", "07/18" ] }