From patchwork Tue Jul 11 13:39:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18808 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CB706C32AA for ; Tue, 11 Jul 2023 13:39:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0B60A628C0; Tue, 11 Jul 2023 15:39:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1689082764; bh=FnsDFbhbH5fHvsvlfP3Vh11bJ9n/j776hWcPzDBcxcU=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vTNn6pJD3CTzH7/zVWhuV81s9/gjDdQP26ge2n/fb4aKy8p9zSWT2PVDoZvnBFGIk LKxNeAQhe2UKjmnZE/KnAIVQeg7/O0y3NLXR57zNE35JOtj/SyYTjiOp3KHxV7uR1L Q92N/ukYZMI//5UHOivWhGH7aJPajd8OMdbR5+ViIH/leR3Scr08wUQH8ntpi4pdVk o6oo7R/FY27B/uNSVls4jbIEsNP5aiudgfDmwhTI4Cov0HSeTwk8GApaJM42rswwEU pBV7BWjsOKkyiI3qY/M2AJ+p2Ylwm+fdzhF5spzN1NSRPpaK+F95fVVBckbxspiPLM vJi5jXwGD4b8A== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D435460570 for ; Tue, 11 Jul 2023 15:39:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="kQTibisf"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 06C3F8CC; Tue, 11 Jul 2023 15:38:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1689082712; bh=FnsDFbhbH5fHvsvlfP3Vh11bJ9n/j776hWcPzDBcxcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQTibisfP767fMqlyo55lKLDZ0/Zt76jEc11rVTbCJHXdq4HTOYQRIqQLH+SOkZO1 J3Shm2uY6h46P4U8AWIuqJdNzbOAFeZ84FQ3WmmoB20tFuS+aANhfq+7isOdTuKyXM 5ZvpCLK18Bnp3EqyDRQ7ILOkbrPCsaeNeiQoCsAM= To: libcamera devel Date: Tue, 11 Jul 2023 14:39:14 +0100 Message-Id: <20230711133915.650485-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230711133915.650485-1-kieran.bingham@ideasonboard.com> References: <20230711133915.650485-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] utils: checkstyle.py: Derive Amendment from Commit X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Amendment commit class is derived from the StagedChanges class (which in turn derives from the Commit base class), however there is no code sharing between Amendment and StagedChanges other than the call to initalise through the base Commit class. Refactor the inheritance to make an Amendment derive directly from Commit. Signed-off-by: Kieran Bingham Reviewed-by: Umang Jain --- utils/checkstyle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index 2ba3165b8ecd..5663af811961 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -269,9 +269,9 @@ class StagedChanges(Commit): return parse_diff(diff.splitlines(True)) -class Amendment(StagedChanges): +class Amendment(Commit): def __init__(self): - StagedChanges.__init__(self) + Commit.__init__(self, '') def _parse(self): # Create a title using HEAD commit