[{"id":27537,"web_url":"https://patchwork.libcamera.org/comment/27537/","msgid":"<97364e62-d441-e69a-9a8f-1b020d60b8a0@ideasonboard.com>","date":"2023-07-11T13:49:56","subject":"Re: [libcamera-devel] [PATCH 3/4] utils: checkstyle.py: Derive\n\tAmendment from Commit","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi,\n\nOn 7/11/23 7:09 PM, Kieran Bingham via libcamera-devel wrote:\n> The Amendment commit class is derived from the StagedChanges class\n> (which in turn derives from the Commit base class), however there is no\n> code sharing between Amendment and StagedChanges other than the call to\n> initalise through the base Commit class.\n>\n> Refactor the inheritance to make an Amendment derive directly from\n> Commit.\n\nThis makes so much sense already just by reading it ;-)\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   utils/checkstyle.py | 4 ++--\n>   1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/utils/checkstyle.py b/utils/checkstyle.py\n> index 2ba3165b8ecd..5663af811961 100755\n> --- a/utils/checkstyle.py\n> +++ b/utils/checkstyle.py\n> @@ -269,9 +269,9 @@ class StagedChanges(Commit):\n>           return parse_diff(diff.splitlines(True))\n>   \n>   \n> -class Amendment(StagedChanges):\n> +class Amendment(Commit):\n>       def __init__(self):\n> -        StagedChanges.__init__(self)\n> +        Commit.__init__(self, '')\n>   \n>       def _parse(self):\n>           # Create a title using HEAD commit","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 B6966BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Jul 2023 13:50:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78ED460570;\n\tTue, 11 Jul 2023 15:50:03 +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 2C49F60570\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jul 2023 15:50:01 +0200 (CEST)","from [192.168.1.108] (unknown [103.251.226.37])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E1F3F8CC;\n\tTue, 11 Jul 2023 15:49:11 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1689083403;\n\tbh=c9k+ZvO8NDDrcdER/JSWuzsuL0RrEkcfYW9hx5p3LTY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=NMSTDqQ3PbV9VCrAvhNKENcweEopMrNRfGDT48o2SmvMYJQPSdOeQyCvqtpbycoC2\n\tsXw+XrqUiYJzkrp8EeB4y+4u5xRFeschxS0IF1OFN/rUtaPDK9Vmy0EAhZlfQhE6Rp\n\t0LCwlvP6vlx99AyUB+Zf011SNL/A9p9BPocwXkQ+Ry60CW1zV1epSmWuVlk3Fe78vc\n\tEn91aUOcb1Lco4d1Q9q/vlTpUozRE9Ybnn3isAgI99f+3gb4HvGHG9vhOc8V4Ph5lG\n\tw1c8ekvmD147tBLl8PG4RETeCGsHpVhqTImblEoSA1qz0L/lSZP2ohwU2aEYr4uBG0\n\tfYFepNSCFhIaA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1689083352;\n\tbh=c9k+ZvO8NDDrcdER/JSWuzsuL0RrEkcfYW9hx5p3LTY=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=HAfFiR3kztmrCQTNTjsQ4DxRYOht1jdmk2x7pLdda0QmFQ+kuwUP2gK641Iw+kwxY\n\tYdbKcvsyF4pBcVISv1CAqjCLEToSdBuSH2XbR0fNbsT5hO5FLT1HWCQCOSRq8gzYnt\n\tu/5m8UIyYUPImt/NL0sz1v/hXlc2GZ6BbrcQJlvM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"HAfFiR3k\"; dkim-atps=neutral","Message-ID":"<97364e62-d441-e69a-9a8f-1b020d60b8a0@ideasonboard.com>","Date":"Tue, 11 Jul 2023 19:19:56 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.7.1","Content-Language":"en-US","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20230711133915.650485-1-kieran.bingham@ideasonboard.com>\n\t<20230711133915.650485-4-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20230711133915.650485-4-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 3/4] utils: checkstyle.py: Derive\n\tAmendment from Commit","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]