]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Convert camel case in commit.py
authorSimon Glass <sjg@chromium.org>
Sat, 29 Jan 2022 21:14:07 +0000 (14:14 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 9 Feb 2022 19:26:12 +0000 (12:26 -0700)
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/commit.py
tools/patman/patchstream.py
tools/patman/series.py

index 5bf2b9402997f3dec64fa71e1d567ed4a1ef1f87..c331a3b12219b11681e0af335232341420b0801b 100644 (file)
@@ -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:
index d57d22a45f758059de6458e23b4ccd0de1a2076b..387e9deae3337fce4738bf8c92acb1d5a8616cdf 100644 (file)
@@ -180,7 +180,7 @@ class PatchStream:
             who (str): Person who gave that rtag, e.g.
                  'Fred Bloggs <fred@bloggs.org>'
         """
-        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
index da734d92cf3b03e3a72db7f77832b11f57957282..98b4c9c9e7fc6b01e8419c0e339f909f5819d06f 100644 (file)
@@ -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):