From patchwork Sat Jan 10 23:56:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1479 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=1768089455; bh=99G5H26LzE3hMggsNDPQ1O24+IibbY60jsGJQBJDUmY=; 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=lQlD4YyXIJHT5BsHN0n7vxJ9PEwJHaUnkb8KxRCk7pet/MPYWhbsFDQptic9aP52e gqSzkHPCCv8Jvcc413UO7gPaa2yApRGLAsRXeVeoPzuXN53moD8gbAN/DpXLpp7jtN uS1hgW3DJF7ZcFIDZTDdFMmj6klwZlDEx4PNZt7NCrkpT3DtPXyCwyC87bwwE0f4Tr AqD8f1wd6JT6F3TvCQzAD0Dt8lW5xhgHq88Alkk74UEfVDl0S+RhpaeqkT4cBJRSFO Ac8fsjd/kgfaA5PU/vmsBw9HMCo+GwcXE/WZWouFMB7xM0y3aFl20QNb1KSS+LuzEH Bal4oU2twII2g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DA047692AE for ; Sat, 10 Jan 2026 16:57:35 -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 mgEa3VI_29WQ for ; Sat, 10 Jan 2026 16:57:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089455; bh=99G5H26LzE3hMggsNDPQ1O24+IibbY60jsGJQBJDUmY=; 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=lQlD4YyXIJHT5BsHN0n7vxJ9PEwJHaUnkb8KxRCk7pet/MPYWhbsFDQptic9aP52e gqSzkHPCCv8Jvcc413UO7gPaa2yApRGLAsRXeVeoPzuXN53moD8gbAN/DpXLpp7jtN uS1hgW3DJF7ZcFIDZTDdFMmj6klwZlDEx4PNZt7NCrkpT3DtPXyCwyC87bwwE0f4Tr AqD8f1wd6JT6F3TvCQzAD0Dt8lW5xhgHq88Alkk74UEfVDl0S+RhpaeqkT4cBJRSFO Ac8fsjd/kgfaA5PU/vmsBw9HMCo+GwcXE/WZWouFMB7xM0y3aFl20QNb1KSS+LuzEH Bal4oU2twII2g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C6CF8692B0 for ; Sat, 10 Jan 2026 16:57:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089453; bh=dpHFFfrxj3IaSQ9sSfuGMV3OWp7XSnxbf+7zKqPEZac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/UNOlrUZt+2rfKQbM8lVBojpiQnWnoT6NWY23kU29/IrGvgI2eLKOSUnL9G+FhEb tdTVpz/iVDEWGTkkD+XTYLJvuwluxNKHMPZQPA//v9BRCHbaQ5t4d7ZvlQEJ8sYfty TblGdq8XR/K0TT+5hHGdgGdYWuzrI1nnV0nJobU+4MVxWEjPe336VdEeVYdLFR7orF X6di1Hlmxy0lAHH3Y91QPTCEX6WqNmuwfUg+XYWJOgk/FRhicj0LsjAr3J4KPXaKg0 ZZRQChEQm2qT7WGpZoMebaerlxf3m824ZIfZk9TsiAum23ygc8HrIU0+QHn/Nc3wXV 3crkPWRD9RTFg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BB944692AE; Sat, 10 Jan 2026 16:57:33 -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 SRzhsiDDS2dy; Sat, 10 Jan 2026 16:57:33 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089449; bh=nEx1gejVvTLE2ATPkOW0NQx/9OSfeGX33ZIlRxqDyD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rOrbSdHRSoMDCc8bjZsJ+F+in4V3Lxr4Xb9XkktNmQFc2CtpwU8HBYOLRhfQh3zyD W/e/Zudejur89QSKYjyjupRPdRkwOn1MKJsVdvNwDEwtBUCkUGPlw+oPgqgMrhuLYZ j/dDIyhr6fb6QIAssqJvLqfNi+4CmLzurScB9/RLpRGh4XLdo4Exi96hJU6BgJRNCt cB2CzgTR+dUZdcej68dJkLkzkVD8clSxx46LUpI0WcNGpw7OqQF9o0si51ZDHiSHwk yUXBZrE4scZB/IPTozwWcx9pv/IoniYfKsqwnbsfKvB2wxsKf5uoV1j1IK13UaW64/ b6Z7butUo3rWQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6EA7F69186; Sat, 10 Jan 2026 16:57:29 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:20 -0700 Message-ID: <20260110235633.1064859-8-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: KEUBDCH6VFFHHW4IRTBTXOAMHQ3R4VXD X-Message-ID-Hash: KEUBDCH6VFFHHW4IRTBTXOAMHQ3R4VXD 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 07/14] buildman: Convert % formatting to f-strings 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 Convert old-style % string formatting to f-strings for better readability. This fixes pylint C0209 warnings. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index f677282c11c..ad60b814e1a 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -301,7 +301,7 @@ class TestFunctional(unittest.TestCase): args = args[:-1] if '-n0' in args: return command.CommandResult(return_code=0) - elif args[-1] == 'upstream/master..%s' % self._test_branch: + elif 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[-1] == self._test_branch: @@ -319,9 +319,9 @@ class TestFunctional(unittest.TestCase): return command.CommandResult(return_code=0) elif config.startswith('branch.badbranch'): return command.CommandResult(return_code=1) - elif config == 'branch.%s.remote' % self._test_branch: + elif config == f'branch.{self._test_branch}.remote': return command.CommandResult(return_code=0, stdout='upstream\n') - elif config == 'branch.%s.merge' % self._test_branch: + elif config == f'branch.{self._test_branch}.merge': return command.CommandResult(return_code=0, stdout='refs/heads/master\n') @@ -554,7 +554,7 @@ Some images are invalid''' self.setup_toolchains() self._run_control('-o', self._output_dir) lines = terminal.get_print_test_lines() - self.assertIn('Building current source for %d boards' % len(BOARDS), + self.assertIn(f'Building current source for {len(BOARDS)} boards', lines[0].text) def test_bad_branch(self): @@ -569,8 +569,8 @@ Some images are invalid''' lines = terminal.get_print_test_lines() # Buildman always builds the upstream commit as well - self.assertIn('Building %d commits for %d boards' % - (self._commits, len(BOARDS)), lines[0].text) + self.assertIn(f'Building {self._commits} commits for {len(BOARDS)} boards', + lines[0].text) self.assertEqual(self._builder.count, self._total_builds) # Only sandbox should succeed, the others don't have toolchains