From patchwork Sat Jan 10 23:56:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1484 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=1768089478; bh=qI7uZA08gTcYlJ41myX0Kv4Owov0wVTZnkm3AtgjLIo=; 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=qZSJ9vjVkdCQIyrBwq3CFdYsRU10fOoME3e7wjzTBD2T4MBzi7MBR/Lh507oR7sqZ MxxglHlSwNro88qkEsA8utsH92Nc7kN9gZOa8Qk+DSLlTfDlB1WaKv3jXij86/GDPX 8zWakK/R7ppclAJnmw5HmP3UGvhYoZ04/eFeZkOw1PG2eE6+AQEocHKovSDBkPRWbg So0TvTz+B9qQ8Cgrt2AZi1qMplFn97TpMohc6QeohffuXpQm7cRdwSKYVe0H/uaEmC 4EbZ7Rh+ldEPXjv8b/0rJzhKYgFrXudRrtXKmLACMOWc/Lca2w7UPBynZNoZ6M9RVR oNTwYlseJq04Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AC64A692B9 for ; Sat, 10 Jan 2026 16:57:58 -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 G0Wv3S_roBYh for ; Sat, 10 Jan 2026 16:57:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089478; bh=qI7uZA08gTcYlJ41myX0Kv4Owov0wVTZnkm3AtgjLIo=; 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=qZSJ9vjVkdCQIyrBwq3CFdYsRU10fOoME3e7wjzTBD2T4MBzi7MBR/Lh507oR7sqZ MxxglHlSwNro88qkEsA8utsH92Nc7kN9gZOa8Qk+DSLlTfDlB1WaKv3jXij86/GDPX 8zWakK/R7ppclAJnmw5HmP3UGvhYoZ04/eFeZkOw1PG2eE6+AQEocHKovSDBkPRWbg So0TvTz+B9qQ8Cgrt2AZi1qMplFn97TpMohc6QeohffuXpQm7cRdwSKYVe0H/uaEmC 4EbZ7Rh+ldEPXjv8b/0rJzhKYgFrXudRrtXKmLACMOWc/Lca2w7UPBynZNoZ6M9RVR oNTwYlseJq04Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9BD7A692B0 for ; Sat, 10 Jan 2026 16:57:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089476; bh=hn4F8C9Nc0cBTWcleJXEEArrWYZd/lZ6uayI/vuBPQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNcP2fffvx8CQsdANHPR5y4oNMJeh6JMyBCI1eS9X/fvJvyolQ2bV1DBkSOR4tjug qGK1LDsaeBq/MdCkfnVxQzq5MEL6wgPwbLXhT/xG8s6146I5g0UCaqgh/yYI8rH3v8 nfYjjxDEtncYQaQSnrXBop3q+ksJjzOZQdcL3kFjocs1JP4mVHLu0vcaFSc+J+ZvM/ w8NihEX6X+gWpVoU1f50phvMQQs1r9mkOg3Qi922N6dxLnrMW8Kec+stRT9IVL0SM+ mykbt8SlXiNX+u9uxqVbSYyQj+i4SUFInkiJ8DjQ/+eOJKKIYTwYNn0BLrwYKiQTgD 4CflKt9z1xV+A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DF4D469186; Sat, 10 Jan 2026 16:57:56 -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 5CfgUNRVFqNX; Sat, 10 Jan 2026 16:57:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768089472; bh=r5x2U1/75bqpxXiiIchyg687GVg1DjQFrr66oIxXLNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YO51V52s+xRFj8HSOl0wHMFRK9LPzddUlV0TJtmUVD0YtGM2CxRnzamfRlfgoynWo zf4uvsTGBCbOMrz5FifCKHA6CmMdSKMLlydsqhVaRyDmRoiRyl+o5agCwRMFybZI5v 1MXi6KPr/a71v5W+KU3FaBB73yDP3DJmgONrNspRVmZwmpcIW26eK/czrDLim0zvqA PhgLJV+EKStm+ajNqg9o1Cns++soDBR0JbiBEyaBJzfIZqYB32xihReVx7VSqTYhPJ y2xw8WgbZI8sY5XRlZJa5lbvXyIc+2bf4QIZduJpMwxtXho1st0l6UnurMgLmTo/3x gKWWBZK62YwFA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 786B1692AE; Sat, 10 Jan 2026 16:57:52 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 10 Jan 2026 16:56:25 -0700 Message-ID: <20260110235633.1064859-13-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: SN6NQA3ERYNNOLGM2LVVEX4FRGUCKJOK X-Message-ID-Hash: SN6NQA3ERYNNOLGM2LVVEX4FRGUCKJOK 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 12/14] buildman: Fix misc pylint 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 several pylint warnings: - C0123 (unidiomatic-typecheck): Use isinstance() rather than type() - W1404 (implicit-str-concat): Add missing comma between arguments - W1514/R1732: Use tools.read_file() instead of open() without encoding The W1404 fix corrects a bug where '-x' and 'board4' are concatenated into '-xboard4' instead of being separate arguments. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/func_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 4112cde9a7b..44ca2499b85 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -545,7 +545,7 @@ Idx Name Size VMA LMA File off Algn else: stderr = ("binman: Filename 'fsp.bin' not found in " 'input path') - elif type(commit) is not str: + elif not isinstance(commit, str): stderr = self._error.get((brd.target, commit.sequence)) else: # For current source builds, commit is 'current' @@ -610,12 +610,11 @@ Idx Name Size VMA LMA File off Algn for brd in self._boards.get_list(): if brd.arch != 'sandbox': errfile = self._builder.get_err_file(commit, brd.target) - fd = open(errfile) + data = tools.read_file(errfile, binary=False) self.assertEqual( - fd.readlines(), + data.splitlines(), [f'Tool chain error for {brd.arch}: ' f"No tool chain found for arch '{brd.arch}'"]) - fd.close() def test_toolchain_errors(self): """Test that toolchain errors are reported in the summary @@ -1362,7 +1361,8 @@ endif def test_exclude_list(self): """Test excluding a list of things""" - self._run_control('-x', 'board2', '-x' 'board4', '-o', self._output_dir) + self._run_control('-x', 'board2', '-x', 'board4', '-o', + self._output_dir) self.assertEqual(['board0', 'board1'], [b.target for b in self._boards.get_selected()])