]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Define Commit.path in the constructor
authorSimon Glass <sjg@chromium.org>
Thu, 3 Mar 2022 02:12:24 +0000 (19:12 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 19 Mar 2022 01:24:24 +0000 (19:24 -0600)
It is good practice to init all variables in the constructor and pylint
sometimes checks this. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
tools/patman/commit.py

index a645b22d087b0248f8b94398f3f78901b6e8cfce..9537de43d391e803d09ade7c7c620d61c1253ed0 100644 (file)
@@ -28,6 +28,7 @@ class Commit:
             key: rtag type (e.g. 'Reviewed-by')
             value: Set of people who gave that rtag, each a name/email string
         warn: List of warnings for this commit, each a str
+        patch (str): Filename of the patch file for this commit
     """
     def __init__(self, hash):
         self.hash = hash
@@ -40,6 +41,7 @@ class Commit:
         self.change_id = None
         self.rtags = collections.defaultdict(set)
         self.warn = []
+        self.patch = ''
 
     def __str__(self):
         return self.subject