From patchwork Sat Jan 10 23:56:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1482 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=1768089470; bh=Sy325nL7+tiYZmJEsEWqpoiSIJL7qj8myhpch6pgUgQ=; 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=ODyPs7T9ti0KdZzUUgtzKu+BqE9QeFB8nhBFMZJkBEV1+rY2Ao7VLOCk2TuTtp3MY fXVg3qUsTSdqLVwUkKu285pITdvG4jz2eRN3gekoWo2gts8QEY72CrBcaL3cWVvMtp gHifRSvNQPq08LpdPy0zVPQUoAIH/Qh3iO7rxnLXVOxjsmVlKVr6q9B/A2FVcc6VGU zW38K+YC0ARceHyoUo/AyGnSJ/NodQZSJeez7XOU4ZJz28/6r/lCooqYGvW99v8IZG UdSI+qVcLwfuchusQAnBm7EucktmIMLBi/vVSM3pSem2hxGYBIVPCHsrMs+zMzCLju lmbKl6Tdo89Bw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A9D65692B5 for ; Sat, 10 Jan 2026 16:57:50 -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 z9EsPdjfUgeX for ; Sat, 10 Jan 2026 16:57:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089470; bh=Sy325nL7+tiYZmJEsEWqpoiSIJL7qj8myhpch6pgUgQ=; 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=ODyPs7T9ti0KdZzUUgtzKu+BqE9QeFB8nhBFMZJkBEV1+rY2Ao7VLOCk2TuTtp3MY fXVg3qUsTSdqLVwUkKu285pITdvG4jz2eRN3gekoWo2gts8QEY72CrBcaL3cWVvMtp gHifRSvNQPq08LpdPy0zVPQUoAIH/Qh3iO7rxnLXVOxjsmVlKVr6q9B/A2FVcc6VGU zW38K+YC0ARceHyoUo/AyGnSJ/NodQZSJeez7XOU4ZJz28/6r/lCooqYGvW99v8IZG UdSI+qVcLwfuchusQAnBm7EucktmIMLBi/vVSM3pSem2hxGYBIVPCHsrMs+zMzCLju lmbKl6Tdo89Bw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 983BB692AE for ; Sat, 10 Jan 2026 16:57:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089468; bh=KDaxdQQ7BON0aIO/+2bph4JjclPIfxvfH4XdMpVF1Xc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TyfbTk3Ntjwvx6rrJOA7q22QwuyM+Ld5rdRoMqbTv0K7kxr7PQNWeFVu8YEntm/sP lGAB7mUL6+gBYLQ2EdDkalEwXOA4BvzURLVtz3XuLRmnn01ClIOw74afVVncdt0L5a tzu62305OTmA0tiaZdMeXMcgVDyt3kql+BB6DTEZ03MtEXR6F4CZM2kPrEw1DOWugb cDrxWgZekur3ozEKz2O4jONJTHVb8MXfyzYgY+Unvn2vP+J7ELX9SEkgTxYOPOZd2f LHcbvAGZucJC08OWmDBaLbOaFJGg6rX48D4xY2ZQcXwYlAQXrzWoO77f1ZHSVa5sa2 P/dP4RvNKolRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3FC1E69186; Sat, 10 Jan 2026 16:57:48 -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 eOjvDnNxCTSs; Sat, 10 Jan 2026 16:57:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089463; bh=RVqN4XufZQykKd+nXl5M+XrQ8tTpone2L3PzFgu17yY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hjqsgbx7o41Q0ehzc7vB/eq4hFM+8TX4q6NdN717Shmq4Bi0yBVuElvRNgrxe/lhR JXS5L6PTY1bwR/lGJtegi82iU9zS4Tw0RG/XKUUkxZZQ/nveCBDm8IxSgOql4HFJv4 3QcavnMo51ErEowqJhfqaZD1xcdOF+u+ABTsq1BKa8Vt4pJzbv/rjBYJ91ol5eOYEW mon98Kb8PuemQeXrAeZfm2b2MA6bwxfkm9R2AjPgJenWXWyohmPWUOFfIPniRPQYqJ vZ0uvoy1IKpGVPt5j8KsjNlxUAI+aG1Ym0a5pxnx+NK9BjMM31m0bSTvXK1V6lcJY5 VVKKYh5lx7NKQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 42624692AE; Sat, 10 Jan 2026 16:57:43 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:23 -0700 Message-ID: <20260110235633.1064859-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110235633.1064859-1-sjg@u-boot.org> References: <20260110235633.1064859-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Y26KXOLO4LOASSFXSJV3W4ZWNIAFQ5UW X-Message-ID-Hash: Y26KXOLO4LOASSFXSJV3W4ZWNIAFQ5UW 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 Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/14] buildman: Fix pylint style warnings in func_test 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 various pylint style warnings: - C0305: Remove trailing newline at end of file - C0325: Remove superfluous parentheses around byte string literal - R1705: Use 'if' instead of 'elif' after return statements Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index e0f9d7af67d..e9bcd954b5b 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -309,9 +309,9 @@ class TestFunctional(unittest.TestCase): args = args[:-1] if '-n0' in args: return command.CommandResult(return_code=0) - elif args[-1] == f'upstream/master..{self._test_branch}': + if args[-1] == f'upstream/master..{self._test_branch}': return command.CommandResult(return_code=0, stdout=COMMIT_SHORTLOG) - elif args[:3] == ['--no-color', '--no-decorate', '--reverse']: + if args[:3] == ['--no-color', '--no-decorate', '--reverse']: if args[-1] == self._test_branch: count = int(args[3][2:]) return command.CommandResult(return_code=0, @@ -325,11 +325,11 @@ class TestFunctional(unittest.TestCase): config = args[0] if config == 'sendemail.aliasesfile': return command.CommandResult(return_code=0) - elif config.startswith('branch.badbranch'): + if config.startswith('branch.badbranch'): return command.CommandResult(return_code=1) - elif config == f'branch.{self._test_branch}.remote': + if config == f'branch.{self._test_branch}.remote': return command.CommandResult(return_code=0, stdout='upstream\n') - elif config == f'branch.{self._test_branch}.merge': + if config == f'branch.{self._test_branch}.merge': return command.CommandResult(return_code=0, stdout='refs/heads/master\n') @@ -360,13 +360,13 @@ class TestFunctional(unittest.TestCase): sub_cmd = arg if sub_cmd == 'config': return self._handle_command_git_config(args) - elif sub_cmd == 'log': + if sub_cmd == 'log': return self._handle_command_git_log(args) - elif sub_cmd == 'clone': + if sub_cmd == 'clone': return command.CommandResult(return_code=0) - elif sub_cmd == 'checkout': + if sub_cmd == 'checkout': return command.CommandResult(return_code=0) - elif sub_cmd == 'worktree': + if sub_cmd == 'worktree': return command.CommandResult(return_code=0) # Not handled, so abort @@ -498,7 +498,7 @@ Idx Name Size VMA LMA File off Algn out_dir = arg[2:] if stage == 'mrproper': return command.CommandResult(return_code=0) - elif stage == 'config': + if stage == 'config': fname = os.path.join(cwd or '', out_dir, '.config') # Vary config based on commit to simulate config changes seq = commit.sequence if hasattr(commit, 'sequence') else 0 @@ -514,9 +514,9 @@ Idx Name Size VMA LMA File off Algn tools.write_file(cfg_fname, cfg_content.encode('utf-8')) return command.CommandResult(return_code=0, combined='Test configuration complete') - elif stage == 'oldconfig': + if stage == 'oldconfig': return command.CommandResult(return_code=0) - elif stage == 'build': + if stage == 'build': stderr = '' fname = os.path.join(cwd or '', out_dir, 'u-boot') tools.write_file(fname, b'U-Boot') @@ -1271,13 +1271,13 @@ Active aarch64 armv8 - armltd total_compute board2 # Add another TARGET to the Kconfig tools.write_file(main, both_data, binary=False) orig_kc_data = tools.read_file(kc_file) - extra = (b''' + extra = b''' if TARGET_BOARD2 config TARGET_OTHER \tbool "other" \tdefault y endif -''') +''' tools.write_file(kc_file, orig_kc_data + extra) params_list, warnings = self._boards.build_board_list(config_dir, src, warn_targets=True) @@ -1591,4 +1591,3 @@ something: me # No reconfigs should be triggered self.assertEqual(0, self._builder.kconfig_reconfig) -