[{"id":30992,"web_url":"https://patchwork.libcamera.org/comment/30992/","msgid":"<20240830145154.GC4642@pendragon.ideasonboard.com>","date":"2024-08-30T14:51:54","subject":"Re: [PATCH 2/3] utils: checkstye: Show issue position for python\n\tissues","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stefan,\n\nThank you for the patch.\n\nOn Fri, Aug 30, 2024 at 02:52:59PM +0200, Stefan Klug wrote:\n> pycodestyle doesn't report the issue length. But it reports the\n> position. Use that as indicator with zero length. This is better than no\n> indicator at all and reduces confusion when multiple issues occur on the\n> same line.\n\nAn example would be nice too.\n\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  utils/checkstyle.py | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/utils/checkstyle.py b/utils/checkstyle.py\n> index c6016f60a446..5901f1a71562 100755\n> --- a/utils/checkstyle.py\n> +++ b/utils/checkstyle.py\n> @@ -737,7 +737,7 @@ class Pep8Checker(StyleChecker):\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> +                issues.append(StyleIssue(line_number, [position, position + 1], line, msg))\n\nI think this should be [position - 1, position].\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>          return issues\n>","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 1AD23C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Aug 2024 14:52:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 02F0163466;\n\tFri, 30 Aug 2024 16:52:26 +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 F1F0561E4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Aug 2024 16:52:24 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A226227;\n\tFri, 30 Aug 2024 16:51:15 +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=\"LABDaGTg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1725029475;\n\tbh=zsP5NGEWmvk2iJgsN0ORzuAEnmCJNCBNnroPp4M0Sy4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=LABDaGTgTT6tTBJLWW/UV77lq8Y81BppRAFq+PAZKQQN8HBo5H67QIPzOxXx02q1m\n\tAxGal4hzS2huYU39USm1alU+8hncYHKDCnnkFhlIcxq2W7MLFqRtykFb80dmqcjHmk\n\t9kG5nvfnqiYsyzpD86eYekogl2+Jcvxn4MW44pR4=","Date":"Fri, 30 Aug 2024 17:51:54 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/3] utils: checkstye: Show issue position for python\n\tissues","Message-ID":"<20240830145154.GC4642@pendragon.ideasonboard.com>","References":"<20240830125311.1702053-1-stefan.klug@ideasonboard.com>\n\t<20240830125311.1702053-3-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240830125311.1702053-3-stefan.klug@ideasonboard.com>","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>"}}]