Skip to contentSkip to conversation

buildman: Fix some newer pylint warnings

PATCH New Tom Rini 1 participant 1 message Feb 12, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 buildman: Fix some newer pylint warnings

With a newer pylint we get a warning about "color" or "col" being used before assigned. This is most easily handled by setting them to None to indicate no specific color is needed, only the default.

---
Cc: Simon Glass <[email protected]>

---
 tools/buildman/builder.py | 3 +++
 1 file changed, 3 insertions(+)
tools/buildman/builder.py +3 -0
index cbf1345281bf..492697310808 100644
@@ -1093,6 +1093,7 @@ class Builder:
             printed_target = False
             for name in sorted(result):
                 diff = result[name]
+                color = None
                 if name.startswith('_'):
                     continue
                 if diff != 0:
@@ -1359,6 +1360,8 @@ class Builder:
                     col = self.col.RED
                 elif line[0] == 'c':
                     col = self.col.YELLOW
+                else:
+                    col = None
                 tprint('   ' + line, newline=True, colour=col)
 
         def _output_err_lines(err_lines, colour):
Signature · 1 line
2.43.0