[Concept,10/22] buildman: Fix docstring in add_line_prefix()

Message ID 20260106142834.2511220-11-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 missing 'brds' parameter documentation and add type annotations
to fix pylint W9015/W9016 warnings. Also fix typo 'training' to
'trailing'.

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

 tools/buildman/test.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
  

Patch

diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index e59c623f6bf..eae614b56b5 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -287,16 +287,17 @@  class TestBuild(unittest.TestCase):
         def add_line_prefix(prefix, brds, error_str, colour):
             """Add a prefix to each line of a string
 
-            The training \n in error_str is removed before processing
+            The trailing newline in error_str is removed before processing
 
             Args:
-                prefix: String prefix to add
-                error_str: Error string containing the lines
-                colour: Expected colour for the line. Note that the board list,
-                    if present, always appears in magenta
+                prefix (str): String prefix to add
+                brds (str): Board names to include in the output
+                error_str (str): Error string containing the lines
+                colour (int): Expected colour for the line. Note that the board
+                    list, if present, always appears in magenta
 
             Returns:
-                New string where each line has the prefix added
+                str: New string where each line has the prefix added
             """
             lines = error_str.strip().splitlines()
             new_lines = []