Patch Detail
Show a patch.
GET /api/1.1/patches/13558/?format=api
{ "id": 13558, "url": "https://patchwork.libcamera.org/api/1.1/patches/13558/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13558/", "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": "<20210827154309.16367-1-laurent.pinchart@ideasonboard.com>", "date": "2021-08-27T15:43:09", "name": "[libcamera-devel] utils: checkstyle.py: Use single-quoted strings when possible", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f3e2408a604c79a4088f2aeca3d00beb8e759b5d", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13558/mbox/", "series": [ { "id": 2412, "url": "https://patchwork.libcamera.org/api/1.1/series/2412/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2412", "date": "2021-08-27T15:43:09", "name": "[libcamera-devel] utils: checkstyle.py: Use single-quoted strings when possible", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2412/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13558/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13558/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 4C88ABD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Aug 2021 15:43:28 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 731056891F;\n\tFri, 27 Aug 2021 17:43:27 +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 DA11860256\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Aug 2021 17:43:26 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5325D499\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Aug 2021 17:43:26 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gF9WB6dG\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1630079006;\n\tbh=WuZCwHmsA19/7aarEb905U9MTVEoVWOOnI7H+L910us=;\n\th=From:To:Subject:Date:From;\n\tb=gF9WB6dG45WV6Z8h6q8xwqkuJddwRIka0uvNtaK7Il5cw1fJpN4tRbz5hrOog/EOm\n\tXdIoJMnGwsDTVbl3tVxS4yPiGiQEL4GRyhBtOgm6bT0HdQ2Ses4KhQIh2P+Qgu/1kr\n\t167R1ZwRV6E8OZiFVLfPuGJmxmY5sAVdDFZJYTSk=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 27 Aug 2021 18:43:09 +0300", "Message-Id": "<20210827154309.16367-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] utils: checkstyle.py: Use single-quoted\n\tstrings when possible", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "checkstyle.py uses single-quoted strings in most locations already.\nThere are a few locations where this wouldn't be convenient (when the\nstring itself contains a single quote, which would then require\nescaping), but there are also a few other locations where double quotes\nare used when single quotes would work fine. Change those to standardize\non single-quoted strings.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/checkstyle.py | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex ececb46eaacc..835f2a9fcd71 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -239,7 +239,7 @@ class StagedChanges(Commit):\n def _parse(self):\n ret = subprocess.run(['git', 'diff', '--staged', '--name-status'],\n stdout=subprocess.PIPE).stdout.decode('utf-8')\n- self._title = \"Staged changes\"\n+ self._title = 'Staged changes'\n self._files = [CommitFile(f) for f in ret.splitlines()]\n \n def get_diff(self, top_level, filename):\n@@ -476,7 +476,7 @@ class Pep8Checker(StyleChecker):\n ret = subprocess.run(['pycodestyle', '--ignore=E501', '-'],\n input=data, stdout=subprocess.PIPE)\n except FileNotFoundError:\n- issues.append(StyleIssue(0, None, \"Please install pycodestyle to validate python additions\"))\n+ issues.append(StyleIssue(0, None, 'Please install pycodestyle to validate python additions'))\n return issues\n \n results = ret.stdout.decode('utf-8').splitlines()\n@@ -509,7 +509,7 @@ class ShellChecker(StyleChecker):\n ret = subprocess.run(['shellcheck', '-Cnever', '-'],\n input=data, stdout=subprocess.PIPE)\n except FileNotFoundError:\n- issues.append(StyleIssue(0, None, \"Please install shellcheck to validate shell script additions\"))\n+ issues.append(StyleIssue(0, None, 'Please install shellcheck to validate shell script additions'))\n return issues\n \n results = ret.stdout.decode('utf-8').splitlines()\n@@ -774,10 +774,10 @@ def check_style(top_level, commit):\n issues += check_file(top_level, commit, f)\n \n if issues == 0:\n- print(\"No issue detected\")\n+ print('No issue detected')\n else:\n print('---')\n- print(\"%u potential %s detected, please review\" %\n+ print('%u potential %s detected, please review' %\n (issues, 'issue' if issues == 1 else 'issues'))\n \n return issues\n@@ -833,7 +833,7 @@ def main(argv):\n for command, mandatory in dependencies.items():\n found = shutil.which(command)\n if mandatory and not found:\n- print(\"Executable %s not found\" % command)\n+ print('Executable %s not found' % command)\n return 1\n \n dependencies[command] = found\n", "prefixes": [ "libcamera-devel" ] }