Patch Detail
Show a patch.
GET /api/patches/3760/?format=api
{ "id": 3760, "url": "https://patchwork.libcamera.org/api/patches/3760/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3760/", "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-7-laurent.pinchart@ideasonboard.com>", "date": "2020-05-12T00:03:04", "name": "[libcamera-devel,06/24] utils: raspberrypi: ctt: Fix pycodestyle E251", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "24e29c22ebf1dd6a50d9cbe105503c651721e549", "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/3760/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/3760/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3760/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 64B5560DFE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 May 2020 02:03:35 +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 D1A6133E;\n\tTue, 12 May 2020 02:03:34 +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=\"V0r9IGbo\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1589241815;\n\tbh=GwNfAeCxzceUjHYmDgv3fDdlQ4dd9EblNIbci8FerZ4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=V0r9IGbo1bZqRoxE2fpNLzDnz/sO7yxNSm1uR16UHN17Yfoi4z4KOLSZkfhIGzEo/\n\t6drvR+AL3YTDRqY3723xuL6mVNABDN+EgK/PDfZve9IizAewYQBV4fTK7iPOuS5oLn\n\tcpITvXMvXhcpbsiIJnVP/TSVoGiiAqv9s4DIkiW8=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 12 May 2020 03:03:04 +0300", "Message-Id": "<20200512000322.11753-7-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 06/24] utils: raspberrypi: ctt: Fix\n\tpycodestyle E251", "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:35 -0000" }, "content": "E251 unexpected spaces around keyword / parameter equals\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/raspberrypi/ctt/ctt.py | 2 +-\n utils/raspberrypi/ctt/ctt_alsc.py | 2 +-\n utils/raspberrypi/ctt/ctt_geq.py | 2 +-\n utils/raspberrypi/ctt/ctt_macbeth_locator.py | 4 ++--\n utils/raspberrypi/ctt/ctt_noise.py | 2 +-\n utils/raspberrypi/ctt/ctt_ransac.py | 6 +++---\n 6 files changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py\nindex 743ee3bca448..46cf92cd75a2 100755\n--- a/utils/raspberrypi/ctt/ctt.py\n+++ b/utils/raspberrypi/ctt/ctt.py\n@@ -474,7 +474,7 @@ class Camera:\n run calibration on all images and sort by slope.\n \"\"\"\n plot = \"rpi.noise\" in self.plot\n- noise_out = sorted([noise(self, Img, plot) for Img in self.imgs], key = lambda x: x[0])\n+ noise_out = sorted([noise(self, Img, plot) for Img in self.imgs], key=lambda x: x[0])\n self.log += '\\nFinished processing images'\n \"\"\"\n take the average of the interquartile\ndiff --git a/utils/raspberrypi/ctt/ctt_alsc.py b/utils/raspberrypi/ctt/ctt_alsc.py\nindex cd99495f6bef..a006f7ffa9c9 100644\n--- a/utils/raspberrypi/ctt/ctt_alsc.py\n+++ b/utils/raspberrypi/ctt/ctt_alsc.py\n@@ -131,7 +131,7 @@ def alsc(Cam, Img, do_alsc_colour, plot=False):\n \"\"\"\n average the green channels into one\n \"\"\"\n- av_ch_g = np.mean((channels[1:2]), axis = 0)\n+ av_ch_g = np.mean((channels[1:2]), axis=0)\n if do_alsc_colour:\n \"\"\"\n obtain 16x12 grid of intensities for each channel and subtract black level\ndiff --git a/utils/raspberrypi/ctt/ctt_geq.py b/utils/raspberrypi/ctt/ctt_geq.py\nindex 175986409edd..1ffa4e91b1b7 100644\n--- a/utils/raspberrypi/ctt/ctt_geq.py\n+++ b/utils/raspberrypi/ctt/ctt_geq.py\n@@ -27,7 +27,7 @@ def geq_fit(Cam, plot):\n data is sorted by green difference and top half is selected since higher\n green difference data define the decision boundary.\n \"\"\"\n- geqs = np.array(sorted(geqs, key = lambda r: np.abs((r[1]-r[0])/r[0])))\n+ geqs = np.array(sorted(geqs, key=lambda r: np.abs((r[1]-r[0])/r[0])))\n \n length = len(geqs)\n g0 = geqs[length//2:, 0]\ndiff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\nindex 949e3686bc15..55ab4fdbc17d 100644\n--- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n+++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n@@ -487,8 +487,8 @@ def get_macbeth_chart(img, ref_data):\n \"\"\"\n clustering = cluster.AgglomerativeClustering(\n n_clusters=None,\n- compute_full_tree = True,\n- distance_threshold = side*2\n+ compute_full_tree=True,\n+ distance_threshold=side*2\n )\n mac_mids_list = [x[0] for x in mac_mids]\n \ndiff --git a/utils/raspberrypi/ctt/ctt_noise.py b/utils/raspberrypi/ctt/ctt_noise.py\nindex f258bc6d458c..2d021e550f85 100644\n--- a/utils/raspberrypi/ctt/ctt_noise.py\n+++ b/utils/raspberrypi/ctt/ctt_noise.py\n@@ -102,7 +102,7 @@ def noise(Cam, Img, plot):\n plt.plot(x, fit_plot_2, label='fit 0 intercept', color='green', ls='--')\n plt.plot(0, 0)\n plt.title('Noise Plot\\nImg: {}'.format(Img.str))\n- plt.legend(loc = 'upper left')\n+ plt.legend(loc='upper left')\n plt.xlabel('Sqrt Pixel Value')\n plt.ylabel('Noise Standard Deviation')\n plt.grid()\ndiff --git a/utils/raspberrypi/ctt/ctt_ransac.py b/utils/raspberrypi/ctt/ctt_ransac.py\nindex a15136254a9e..f7a722e0f73e 100644\n--- a/utils/raspberrypi/ctt/ctt_ransac.py\n+++ b/utils/raspberrypi/ctt/ctt_ransac.py\n@@ -11,7 +11,7 @@ scale = 2\n \"\"\"\n constructs normalised macbeth chart corners for ransac algorithm\n \"\"\"\n-def get_square_verts(c_err = 0.05, scale = scale):\n+def get_square_verts(c_err=0.05, scale=scale):\n \"\"\"\n define macbeth chart corners\n \"\"\"\n@@ -57,13 +57,13 @@ def get_square_verts(c_err = 0.05, scale = scale):\n # print(square_verts)\n return np.array(square_verts, np.float32), mac_norm\n \n-def get_square_centres(c_err = 0.05, scale=scale):\n+def get_square_centres(c_err=0.05, scale=scale):\n \"\"\"\n define macbeth square centres\n \"\"\"\n verts, mac_norm = get_square_verts(c_err, scale=scale)\n \n- centres = np.mean(verts, axis = 1)\n+ centres = np.mean(verts, axis=1)\n # print('centres')\n # print(centres)\n return np.array(centres, np.float32)\n", "prefixes": [ "libcamera-devel", "06/24" ] }