From patchwork Tue Jan 6 22:03:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1314 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737112; bh=hqWZF8PSUIzORcsGf9Lirim/yFnK9Jc9xBhJh4zq7FY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dL0hCtvBDb7HMt5f8pRb/DYTOTM77JSQBMTj+sUrjdk71vJRy8ws+YR3s24ZQqIgq cYhADRpexJv3Rf6q0o4pX+CdVT5KOsIUydiKip+hBVO9X5Lx5aNLwJnbus2pnq/RPS Fzn+gF5NQcZSMajUGLG5DHkBEFL3zvDyvsApNlrw56Sl9/7KuprctwWLhCyLaQoTMw 31Bf0Xc4zy8Jl46qx344gLzCVMboUG/7kDfePMPA0V06v3YJ2fcZZS5JoreHEnJn2g llxwHSs7VY1/wJiUtZ6QnLf+XseKWvtF+llxysIQCRl0ylZXMCmLu1+Plzh2vlvlGn Bjgwfl9AD4fjA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0AE7469158 for ; Tue, 6 Jan 2026 15:05:12 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tlM_xDHBeAbI for ; Tue, 6 Jan 2026 15:05:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737111; bh=hqWZF8PSUIzORcsGf9Lirim/yFnK9Jc9xBhJh4zq7FY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dDl5g/4IHplIW/4v57M3zJXqo27SKa03QzvB77cuIZgvgZ74pbJaijOqNIi4nUzxy oYMKv0lEpBmryG+9s+1Gm9NuAeFzyYbVEzzTBRtLGH3GDB///SDM/KosQQ2jT7TITl S5QIp6n6Bntfc741QrjfTA6F43DGkP+aaGyzGbcipda+VWRmvPUKzb7zVuZm9LwPgx zgddLCeWoC5qJ7GOb9rlkcce5UKNj5O/QI4fih8pv+cNQ+mwwNVI4IO6FG4F/t0f0b iwBr3zh8Ej252veGDYMMX6OJ9GeCIO90V+QiGA5V1uZ7QympSnv518ScTQMv3rp996 n91O+3uYbT8Lg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ECB1B69146 for ; Tue, 6 Jan 2026 15:05:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737110; bh=xCZfqqewFH9WYwbHBHj+o9WeB4rotW7i2WH2SJCmrLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g4ZjKj5cOw5Kt9pFqcXGAiOySRTDf7O4ugu7IQi0I2pQwRwa3M9G6I2oBCQDfFJZO ZpQ4x5JhY2w3qw/otCqZOrOPY0JTpGxLLrZv5f4pNbHL2m1x2KC5j57hqtkXlITnZA /LqT1p/Yc6B6oEZ80+KuHdQDktgSr+Nu67bR6+vZUzSzsvFE+GVUEUrZkhRi9ytFGR xUU9kM13JK4wypQdyQNdmEDha8runfe5dQpD+dX1po4azY4HteDaHEYkCr+Tt7aqjM JCOFmXN2NwvO+fHepFvtyIFR+tdo1GJhQgltspEji5b8hBWXE4hUABYyfhQhXRdPjv Z6qRmlAHkasuA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5CF1C5FF82; Tue, 6 Jan 2026 15:05:10 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id cmwxecX89BXV; Tue, 6 Jan 2026 15:05:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737106; bh=TwdcFCVSXW/363NBybXQQI+P19U+6WZkF1EKxr9MvTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nenDwbXiT7Izobswaxa2uwlRkrPLv3yseKq9mPMfKOOkDP4eMkUGOxUFuMpyrxehh cwU053kJCd1flJyJiGiEDzdslQKQU5URdrpedZgp4O6b+9VXuShUD3qTrDhpAVSmHE nw9PCfyBIRkTBhshuRY6ln74yHZrCQO0wdUe6ARMxSlquS3KkuK6wQXJGADISvFEkG 7vowVvAryUJkqmvV9qRu6asEKg5jt7pWhV0xfu2koeQGVv3hFFRjT/uyrwiyJ59xVU afmqRG53vO1y+m1KS9q9yd/xs196+kTjBDlqDqKtSjSskep8RdC3zenNpwdqVwDc/a 1T2aZI9wO+bGQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DE915690CB; Tue, 6 Jan 2026 15:05:05 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 15:03:29 -0700 Message-ID: <20260106220403.2915630-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106220403.2915630-1-sjg@u-boot.org> References: <20260106220403.2915630-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: FWPVC3GGQUOUD2XJIDFZEFZPF43I74H2 X-Message-ID-Hash: FWPVC3GGQUOUD2XJIDFZEFZPF43I74H2 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 11/29] buildman: Fix miscellaneous pylint warnings in builder.py List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Fix several pylint warnings: - W0105: Convert standalone docstring for ErrLine to comments - W0612: Use _ for unused loop variable in Config.__hash__() - W0621: Rename signal parameter to signum to avoid shadowing import - C1802: Use implicit boolean test instead of len() - C0117: Use 'arch not in' instead of 'not arch in' - C0121: Use 'is True' instead of '== True' Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/builder.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index b3f979e91dd..195fbe40324 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -105,13 +105,11 @@ u-boot/ source directory .git/ repository """ -"""Holds information about a particular error line we are outputing - - char: Character representation: '+': error, '-': fixed error, 'w+': warning, - 'w-' = fixed warning - boards: List of Board objects which have line in the error/warning output - errline: The text of the error line -""" +# Holds information about a particular error line we are outputting +# char: Character representation: '+': error, '-': fixed error, 'w+': warning, +# 'w-' = fixed warning +# boards: List of Board objects which have line in the error/warning output +# errline: The text of the error line ErrLine = collections.namedtuple('ErrLine', 'char,brds,errline') # Possible build outcomes @@ -150,7 +148,7 @@ class Config: def __hash__(self): val = 0 - for fname, config in self.config.items(): + for _, config in self.config.items(): for key, value in config.items(): print(key, value) val = val ^ hash(key) & hash(value) @@ -465,11 +463,11 @@ class Builder: """Get rid of all threads created by the builder""" self.threads.clear() - def signal_handler(self, signal, frame): + def signal_handler(self, signum, frame): """Handle a signal by exiting Args: - signal (int): Signal number + signum (int): Signal number frame (frame): Stack frame at point of signal """ sys.exit(1) @@ -904,7 +902,7 @@ class Builder: # Decide whether the build was ok, failed or created warnings if return_code: rc = OUTCOME_ERROR - elif len(err_lines): + elif err_lines: rc = OUTCOME_WARNING else: rc = OUTCOME_OK @@ -1066,10 +1064,10 @@ class Builder: else: arch = 'unknown' text = self.col.build(color, ' ' + target) - if not arch in done_arch: + if arch not in done_arch: text = f' {self.col.build(color, char)} {text}' done_arch[arch] = True - if not arch in arch_list: + if arch not in arch_list: arch_list[arch] = text else: arch_list[arch] += text @@ -1807,7 +1805,7 @@ class Builder: newline=False) gitutil.add_worktree(src_dir, thread_dir) terminal.print_clear() - elif setup_git == 'clone' or setup_git == True: + elif setup_git == 'clone' or setup_git is True: tprint(f'\rCloning repo for thread {thread_num}', newline=False) gitutil.clone(src_dir, thread_dir)