{"id":21159,"url":"https://patchwork.libcamera.org/api/1.1/patches/21159/?format=json","web_url":"https://patchwork.libcamera.org/patch/21159/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240903161059.246075-3-stefan.klug@ideasonboard.com>","date":"2024-09-03T16:10:55","name":"[v2,2/2] utils: checkstyle: Remove style checker for python pep8","commit_ref":"8161018b9b2a161b83072d5ddec7658079850c21","pull_url":null,"state":"accepted","archived":false,"hash":"13fbff9e1e915714bb986356a322b7e3e1aae5c8","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/1.1/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/21159/mbox/","series":[{"id":4560,"url":"https://patchwork.libcamera.org/api/1.1/series/4560/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4560","date":"2024-09-03T16:10:53","name":"Python improvements to checkstyle.py","version":2,"mbox":"https://patchwork.libcamera.org/series/4560/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21159/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21159/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 441AAC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Sep 2024 16:11:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DF7D4634CB;\n\tTue,  3 Sep 2024 18:11:12 +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 B1000634E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Sep 2024 18:11:11 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:6c8f:1e7a:f75:b6f6])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B703B16A;\n\tTue,  3 Sep 2024 18:09:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P2MBeca1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1725379799;\n\tbh=Is49YY0SRWDDRWLkxn1h4o45J/r1xCpByFUCIFOOopY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=P2MBeca18SeR+F3xj/dLz19VOSZsv8qjnAJKVUpsTsemHvw1rtp5dFk8GT0/hlKB/\n\tOCZRYkxyMD2fN1n+GtUzLVVjzTTYDk6f2OqGMiSx2R6iag7B7NC7YcyLv37r4el/W2\n\tv9zuXYGIkP9X0Un5kocnoI5tRSJARjQIQMYP3OEs=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","Subject":"[PATCH v2 2/2] utils: checkstyle: Remove style checker for python\n\tpep8","Date":"Tue,  3 Sep 2024 18:10:55 +0200","Message-ID":"<20240903161059.246075-3-stefan.klug@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20240903161059.246075-1-stefan.klug@ideasonboard.com>","References":"<20240903161059.246075-1-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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":"The issues detected and fixed by autopep8 are the same as the ones\ndetected by pycodestyle. As the formatter runs unconditionally we can\nremove the checker.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n utils/checkstyle.py | 33 ---------------------------------\n 1 file changed, 33 deletions(-)","diff":"diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 1ee211c3bb9b..ab89c0a14fab 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -709,39 +709,6 @@ class MesonChecker(StyleChecker):\n         return issues\n \n \n-class Pep8Checker(StyleChecker):\n-    patterns = ('*.py',)\n-    results_regex = re.compile(r'stdin:([0-9]+):([0-9]+)(.*)')\n-\n-    def __init__(self, content):\n-        super().__init__()\n-        self.__content = content\n-\n-    def check(self, line_numbers):\n-        issues = []\n-        data = ''.join(self.__content).encode('utf-8')\n-\n-        try:\n-            ret = subprocess.run(['pycodestyle', '--ignore=E501', '-'],\n-                                 input=data, stdout=subprocess.PIPE)\n-        except FileNotFoundError:\n-            issues.append(StyleIssue(0, None, None, 'Please install pycodestyle to validate python additions'))\n-            return issues\n-\n-        results = ret.stdout.decode('utf-8').splitlines()\n-        for item in results:\n-            search = re.search(Pep8Checker.results_regex, item)\n-            line_number = int(search.group(1))\n-            position = int(search.group(2))\n-            msg = search.group(3)\n-\n-            if line_number in line_numbers:\n-                line = self.__content[line_number - 1]\n-                issues.append(StyleIssue(line_number, None, line, msg))\n-\n-        return issues\n-\n-\n class ShellChecker(StyleChecker):\n     patterns = ('*.sh',)\n     results_line_regex = re.compile(r'In - line ([0-9]+):')\n","prefixes":["v2","2/2"]}