[Concept,00/14] buildman: Clean up pylint warnings in func_test

Message ID 20260110235633.1064859-1-sjg@u-boot.org
Headers
Series buildman: Clean up pylint warnings in func_test |

Message

Simon Glass Jan. 10, 2026, 11:56 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

This series addresses pylint warnings in tools/buildman/func_test.py,
improving the code quality score from ~9.06 to 10.0/10, although with
some disabling.

Changes include:
- Rename constants to UPPER_CASE and methods to snake_case (C0103)
- Add missing module and function docstrings (C0114/C0116)
- Fix unused variables and arguments (W0612/W0613)
- Use isinstance() instead of type() for type checking (C0123)
- Fix implicit string concatenation bug (W1404)
- Use tools.read_file() instead of open() without encoding
- Initialise attributes in setUp() instead of dynamically (W0201)
- Break long lines to stay within 80 characters (C0301)
- Refactor _handle_command() to use single return
- Suppress unavoidable structural warnings (too-many-lines, etc.)


Simon Glass (14):
  buildman: Rename module constants to UPPER_CASE in func_test
  buildman: Use snake_case for method names in func_test
  buildman: Remove unnecessary semicolons in func_test
  buildman: Use identity comparison for False in func_test
  buildman: Remove unused import in func_test
  buildman: Fix indentation in func_test
  buildman: Convert % formatting to f-strings in func_test
  buildman: Add missing docstrings in func_test
  buildman: Fix unused variable warnings in func_test
  buildman: Fix pylint style warnings in func_test
  buildman: Fix attribute and line-length warnings in func_test
  buildman: Fix misc pylint warnings in func_test
  buildman: Refactor _handle_command() to use single return
  buildman: Suppress pylint warnings for test structure

 tools/buildman/func_test.py | 432 ++++++++++++++++++++----------------
 1 file changed, 238 insertions(+), 194 deletions(-)