Patch Detail
Show a patch.
GET /api/patches/3761/?format=api
{ "id": 3761, "url": "https://patchwork.libcamera.org/api/patches/3761/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3761/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20200512000322.11753-8-laurent.pinchart@ideasonboard.com>", "date": "2020-05-12T00:03:05", "name": "[libcamera-devel,07/24] utils: raspberrypi: ctt: Fix pycodestyle E128", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "82a6138955d4272d4fb1c5c9bdc9ed935e325054", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3761/mbox/", "series": [ { "id": 897, "url": "https://patchwork.libcamera.org/api/series/897/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=897", "date": "2020-05-12T00:02:58", "name": "utils: raspberrypi: ctt: Comply with pycodestyle", "version": 1, "mbox": "https://patchwork.libcamera.org/series/897/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3761/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3761/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4346A60E0B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 May 2020 02:03:36 +0200 (CEST)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4F52711F3;\n\tTue, 12 May 2020 02:03:35 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"aqQgAac1\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1589241815;\n\tbh=9kszIlv6hGVElr0z1u3vpJASMnkd+qi1tKYUZU1G+Kk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=aqQgAac1mmURK4r4/k0Jr8crx+eZ/6mSCkZtMjCv3Z9DzcNHuJ2ej2XZYxUdryN+j\n\t/WmyFyOps0bF0TlmW/deDPVygPuG2/HLL45mm9PS0uo5w9PHDmy8UtHdyLFuzuw47J\n\tvvknNXSWGGhUsPEgzYQs10G3tQeI1XYSbvW/WZms=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 12 May 2020 03:03:05 +0300", "Message-Id": "<20200512000322.11753-8-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.26.2", "In-Reply-To": "<20200512000322.11753-1-laurent.pinchart@ideasonboard.com>", "References": "<20200512000322.11753-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 07/24] utils: raspberrypi: ctt: Fix\n\tpycodestyle E128", "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>", "X-List-Received-Date": "Tue, 12 May 2020 00:03:39 -0000" }, "content": "E128 continuation line under-indented for visual indent\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/raspberrypi/ctt/ctt_macbeth_locator.py | 8 +++-----\n utils/raspberrypi/ctt/ctt_ransac.py | 14 +++++++-------\n 2 files changed, 10 insertions(+), 12 deletions(-)", "diff": "diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\nindex 55ab4fdbc17d..63dbc4a1f347 100644\n--- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n+++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n@@ -363,9 +363,8 @@ def get_macbeth_chart(img, ref_data):\n \"\"\"\n find Contours in image\n \"\"\"\n- conts, _ = cv2.findContours(edges,\n- cv2.RETR_TREE,\n- cv2.CHAIN_APPROX_NONE)\n+ conts, _ = cv2.findContours(edges, cv2.RETR_TREE,\n+ cv2.CHAIN_APPROX_NONE)\n if len(conts) == 0:\n raise MacbethError(\n '\\nWARNING: No macbeth chart found!'\n@@ -381,8 +380,7 @@ def get_macbeth_chart(img, ref_data):\n conts_per = []\n for i in range(len(conts)):\n per = cv2.arcLength(conts[i], True)\n- poly = cv2.approxPolyDP(conts[i],\n- epsilon*per, True)\n+ poly = cv2.approxPolyDP(conts[i], epsilon*per, True)\n if len(poly) == 4 and cv2.isContourConvex(poly):\n conts_per.append((poly, per))\n \ndiff --git a/utils/raspberrypi/ctt/ctt_ransac.py b/utils/raspberrypi/ctt/ctt_ransac.py\nindex f7a722e0f73e..a1f5e8c95ac1 100644\n--- a/utils/raspberrypi/ctt/ctt_ransac.py\n+++ b/utils/raspberrypi/ctt/ctt_ransac.py\n@@ -29,11 +29,11 @@ def get_square_verts(c_err=0.05, scale=scale):\n \n square_verts = []\n square_0 = np.array(((0, 0), (0, side),\n- (side, side), (side, 0)), np.float32)\n+ (side, side), (side, 0)), np.float32)\n offset_0 = np.array((b_bord_x, b_bord_y), np.float32)\n c_off = side * c_err\n offset_cont = np.array(((c_off, c_off), (c_off, -c_off),\n- (-c_off, -c_off), (-c_off, c_off)), np.float32)\n+ (-c_off, -c_off), (-c_off, c_off)), np.float32)\n square_0 += offset_0\n square_0 += offset_cont\n \"\"\"\n@@ -41,16 +41,16 @@ def get_square_verts(c_err=0.05, scale=scale):\n \"\"\"\n for i in range(6):\n shift_i = np.array(((i*side, 0), (i*side, 0),\n- (i*side, 0), (i*side, 0)), np.float32)\n+ (i*side, 0), (i*side, 0)), np.float32)\n shift_bord =np.array(((i*s_bord, 0), (i*s_bord, 0),\n- (i*s_bord, 0), (i*s_bord, 0)), np.float32)\n+ (i*s_bord, 0), (i*s_bord, 0)), np.float32)\n square_i = square_0 + shift_i + shift_bord\n for j in range(4):\n shift_j = np.array(((0, j*side), (0, j*side),\n- (0, j*side), (0, j*side)), np.float32)\n+ (0, j*side), (0, j*side)), np.float32)\n shift_bord = np.array(((0, j*s_bord),\n- (0, j*s_bord), (0, j*s_bord),\n- (0, j*s_bord)), np.float32)\n+ (0, j*s_bord), (0, j*s_bord),\n+ (0, j*s_bord)), np.float32)\n square_j = square_i + shift_j + shift_bord\n square_verts.append(square_j)\n # print('square_verts')\n", "prefixes": [ "libcamera-devel", "07/24" ] }