[Concept,02/22] buildman: Add __init__() to Options class in test.py

Message ID 20260106142834.2511220-3-sjg@u-boot.org
State New
Headers
Series buildman: Clean up test.py for pylint compliance |

Commit Message

Simon Glass Jan. 6, 2026, 2:28 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Add an __init__() method to the Options class to initialize all
attributes used by _testGit(). This fixes pylint W0201 warnings
about attributes defined outside __init__

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 tools/buildman/test.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
  

Patch

diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index 4e3b47eda45..735d93a0b7b 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -132,7 +132,21 @@  OUTCOME_OK, OUTCOME_WARN, OUTCOME_ERR = range(3)
 
 class Options:
     """Class that holds build options"""
-    pass
+    def __init__(self):
+        self.git = None
+        self.summary = False
+        self.jobs = None
+        self.dry_run = False
+        self.branch = None
+        self.force_build = False
+        self.list_tool_chains = False
+        self.count = -1
+        self.git_dir = None
+        self.threads = None
+        self.show_unknown = False
+        self.quick = False
+        self.show_errors = False
+        self.keep_outputs = False
 
 class TestBuild(unittest.TestCase):
     """Test buildman