From patchwork Sat Jan 29 21:14:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1586264 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=mNDwPVvC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JmRt567ZSz9t4b for ; Sun, 30 Jan 2022 08:14:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 213EB836B8; Sat, 29 Jan 2022 22:14:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mNDwPVvC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 84B3F836C2; Sat, 29 Jan 2022 22:14:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AB3978367B for ; Sat, 29 Jan 2022 22:14:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2e.google.com with SMTP id p63so11189301iod.11 for ; Sat, 29 Jan 2022 13:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tnVMXKYNe2dYbamf6fzyA5WQneBriY0DpoUEezTzKZ0=; b=mNDwPVvC5T56BG9UYwWjt3r3EViVRpwuLjeFCSh+Zi/UMRIlRwPYhQBxG5Bat0+9x9 5vSOOFUMbM3+P2eS+B466IUL+6uvJB9zkZ8BX/40gDAJmEEluDoJpBWdqPmVCbfqR5Ur XPeMEJqQ1o7ej4OejFERo464Ni/bJDfTMmMfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tnVMXKYNe2dYbamf6fzyA5WQneBriY0DpoUEezTzKZ0=; b=7vwDqrcmgCiYizPhFNqhgifpV5m3haUE2NNwnWE+e9Peo6RQZvQh4EsA6jvRE4tZlf jhEohI1yC5dYjjPBcXRCEjsAKcy3x3YT0oZPkti05kmpWe7e4R+pfVhPfscJBZUmOIZh 6LKa1Qs3g0XvokCycz3OhlUiur0i3kZaZrv7DRdsp622W/0tw5nmxPtI/zDlE09O20HB lHt89keBNQhglkF0vjBIYJkERe0azPvmfeJC+oiI0BicERzpYxxXJltTYJ01JaAZooEX +ejUAKmAcLTLwx/Q/kioCcigN/Fmsds7ZL2EFSrKoEysgs55QNzwYSveyD7HpJjLHxRm uLBA== X-Gm-Message-State: AOAM531m3DgZjtElqHyG03ycumIbbne5/ZaaNKVCF5pjKJgwLjy1vbi6 QhFeEjk7t4nAxfNG0/I9VxWoG+UlScbtow== X-Google-Smtp-Source: ABdhPJxsIX6TEzWGk0KqCxOVGDNEXaPxcpk1/y1GymYSxs32817DDLoFBjfvW4DBIc60oCA6ROLiFA== X-Received: by 2002:a5e:a906:: with SMTP id c6mr8120344iod.117.1643490875260; Sat, 29 Jan 2022 13:14:35 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c3sm17218110iow.28.2022.01.29.13.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 13:14:34 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass Subject: [PATCH 04/17] patman: Convert camel case in commit.py Date: Sat, 29 Jan 2022 14:14:07 -0700 Message-Id: <20220129211420.528117-5-sjg@chromium.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220129211420.528117-1-sjg@chromium.org> References: <20220129211420.528117-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/commit.py | 10 +++++----- tools/patman/patchstream.py | 8 ++++---- tools/patman/series.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/patman/commit.py b/tools/patman/commit.py index 5bf2b940299..c331a3b1221 100644 --- a/tools/patman/commit.py +++ b/tools/patman/commit.py @@ -44,7 +44,7 @@ class Commit: def __str__(self): return self.subject - def AddChange(self, version, info): + def add_change(self, version, info): """Add a new change line to the change list for a version. Args: @@ -55,7 +55,7 @@ class Commit: self.changes[version] = [] self.changes[version].append(info) - def CheckTags(self): + def check_tags(self): """Create a list of subject tags in the commit Subject tags look like this: @@ -78,7 +78,7 @@ class Commit: str = m.group(2) return None - def AddCc(self, cc_list): + def add_cc(self, cc_list): """Add a list of people to Cc when we send this patch. Args: @@ -86,7 +86,7 @@ class Commit: """ self.cc_list += cc_list - def CheckDuplicateSignoff(self, signoff): + def check_duplicate_signoff(self, signoff): """Check a list of signoffs we have send for this patch Args: @@ -99,7 +99,7 @@ class Commit: self.signoff_set.add(signoff) return True - def AddRtag(self, rtag_type, who): + def add_rtag(self, rtag_type, who): """Add a response tag to a commit Args: diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index d57d22a45f7..387e9deae33 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -180,7 +180,7 @@ class PatchStream: who (str): Person who gave that rtag, e.g. 'Fred Bloggs ' """ - self.commit.AddRtag(rtag_type, who) + self.commit.add_rtag(rtag_type, who) def _close_commit(self): """Save the current commit into our commit list, and reset our state""" @@ -230,7 +230,7 @@ class PatchStream: elif self.in_change == 'Cover': self.series.AddChange(self.change_version, None, change) elif self.in_change == 'Commit': - self.commit.AddChange(self.change_version, change) + self.commit.add_change(self.change_version, change) self.change_lines = [] def _finalise_snippet(self): @@ -494,14 +494,14 @@ class PatchStream: who.find(os.getenv('USER') + '@') != -1): self._add_warn("Ignoring '%s'" % line) elif rtag_type == 'Patch-cc': - self.commit.AddCc(who.split(',')) + self.commit.add_cc(who.split(',')) else: out = [line] # Suppress duplicate signoffs elif signoff_match: if (self.is_log or not self.commit or - self.commit.CheckDuplicateSignoff(signoff_match.group(1))): + self.commit.check_duplicate_signoff(signoff_match.group(1))): out = [line] # Well that means this is an ordinary line diff --git a/tools/patman/series.py b/tools/patman/series.py index da734d92cf3..98b4c9c9e7f 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -94,7 +94,7 @@ class Series(dict): Args: commit: Commit object to add """ - commit.CheckTags() + commit.check_tags() self.commits.append(commit) def ShowActions(self, args, cmd, process_tags):