From patchwork Fri Jan 9 18:30:53 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1379 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=1767983498; bh=8jyVknuiJsA77TudGBzF30w2c32tUczi8ifhpSh62ws=; 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=lysPys9924CZs+Oyn8ZdIBZF0XgfWuS4X+YVhmUI2v9iu6nvCfOxROFRpRpkcTbL8 MjNBJ0pOH0Tc/utLDfLDNM8RupMiGGcxDJVKX9U8zcJUzloCCRY1Ys2wWvmhPtNQnv g28BmE+DMDlcTSyd4uaH7MNIiiuky+Df10SmUtwIwJIb5VB4EWYrUaih4q/+WliYd0 Rlno5LziqobSbqTpyicfFdxJS1cVIbyfa/IQnUnqbY+yiwKiWI0P7lVazZaAHC4UEf NVMdoFWrwbipRuy10WFxzgI8M4htGvfZoeAxgyEQSzzHUTvwE2hm23qKmnZJ5JkpY5 VvhEoATkFXRkw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D13D369211 for ; Fri, 9 Jan 2026 11:31:38 -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 HxoULEfe-QlP for ; Fri, 9 Jan 2026 11:31:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983498; bh=8jyVknuiJsA77TudGBzF30w2c32tUczi8ifhpSh62ws=; 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=lysPys9924CZs+Oyn8ZdIBZF0XgfWuS4X+YVhmUI2v9iu6nvCfOxROFRpRpkcTbL8 MjNBJ0pOH0Tc/utLDfLDNM8RupMiGGcxDJVKX9U8zcJUzloCCRY1Ys2wWvmhPtNQnv g28BmE+DMDlcTSyd4uaH7MNIiiuky+Df10SmUtwIwJIb5VB4EWYrUaih4q/+WliYd0 Rlno5LziqobSbqTpyicfFdxJS1cVIbyfa/IQnUnqbY+yiwKiWI0P7lVazZaAHC4UEf NVMdoFWrwbipRuy10WFxzgI8M4htGvfZoeAxgyEQSzzHUTvwE2hm23qKmnZJ5JkpY5 VvhEoATkFXRkw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BBB4A6920C for ; Fri, 9 Jan 2026 11:31:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983496; bh=Xuh2S+e/BJbBD/Nz7CCp+VXuP5KBiy9evVpDYT4enks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l29VirvZ2IpdPafJ4hE1yUaEViynQo6aOHS9NesdQXCPwEuUwTqksrfZweGLjdE2/ RQt1Xn+SoyoHazSdxyWNepqWLHg1cZESjEkG/9AkFbzchMdRwHNlhq/EjtYLz/HMEu Dfel15nw58WeV7D49V8RJBPfu3aEShBGSjQR1lqxyDSVXbUbNzEdFYN5cdBjWmNACu 6+aW51lff2Hy8Bp7J9GBGO33iCsFEQiOBJnlUpEoXXWgnzari/6pslT9D9/dQG3gDz +njVuDK3Cv6zP2n2ve+RrZHmkLOz4soOsunFKYtXpbS9K6hpxqvIboWpWk+Jl1OFFq C9ji78k9vSqfg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E261D69208; Fri, 9 Jan 2026 11:31:36 -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 vYOynLTrtcR0; Fri, 9 Jan 2026 11:31:36 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767983493; bh=YrDTAmd+maVvaB3PdkD6eGJIKKQo0D2EttErM2JeVts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ywocco58rp/YtHDnuLnRH54laKZLsmTBBv2wwQpemW/2oVmNs7prFtrW0nLegNxhw zUxzH5Z9cqOf63Dc8O1fzOROu4vAyvjsr8TeKo0FfDNi3Lm5t+GG/52JKxs3hp7cof BqPc4SIvxIvKazY3JoJY+Rv3s6+EJfLi0FUmSMSvfw64AKJ4eWZ8g8IjrGSmW1po8b TtXUP8C+nk7zP2wo/aNkHr+/sU8d9wnywbeTmpQcrB7C+lWYLeECh8cio+7s6HCkzQ T+mGsz/3rUOKnWQhg+Is/1P2cyr/6dPYRdY8+zrWF/hU4A/OXa3ZDRBg9byVErR25Y e/zXdw53w2zMg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9407269209; Fri, 9 Jan 2026 11:31:32 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 9 Jan 2026 11:30:53 -0700 Message-ID: <20260109183116.3262115-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260109183116.3262115-1-sjg@u-boot.org> References: <20260109183116.3262115-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LHYGH2UAVRQSDQSK2E3EJADQ2NN7XOJX X-Message-ID-Hash: LHYGH2UAVRQSDQSK2E3EJADQ2NN7XOJX 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: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/18] buildman: Add missing return documentation 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 Add return type documentation to functions that were missing it, fixing pylint W9011/W9012 warnings. The affected functions are: - make(): Returns CommandResult - check_output() (nested): Returns bool - get_output_dir(): Returns str path - get_done_file(): Returns str path - get_sizes_file(): Returns str path - get_func_sizes_file(): Returns str path - get_objdump_file(): Returns str path - get_err_file(): Returns str path - get_thread_dir(): Returns str path Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/builder.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index b7343b57c0d..4bcde84adca 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -592,9 +592,20 @@ class Builder: cwd (str): Directory where make should be run args: Arguments to pass to make kwargs: Arguments to pass to command.run_one() + + Returns: + CommandResult: Result of the make operation """ def check_output(_stream, data): + """Check output for config restart loops + + Args: + data (bytes): Output data to check + + Returns: + bool: True to terminate the command, False to continue + """ if b'Restart config' in data: self._restarting_config = True @@ -690,6 +701,9 @@ class Builder: Args: commit_upto (int): Commit number to use (0..self.count-1) + + Returns: + str: Path to the output directory """ if self.work_in_output: return self._working_dir @@ -729,6 +743,9 @@ class Builder: Args: commit_upto (int): Commit number to use (0..self.count-1) target (str): Target name + + Returns: + str: Path to the done file """ return os.path.join(self.get_build_dir(commit_upto, target), 'done') @@ -738,6 +755,9 @@ class Builder: Args: commit_upto (int): Commit number to use (0..self.count-1) target (str): Target name + + Returns: + str: Path to the sizes file """ return os.path.join(self.get_build_dir(commit_upto, target), 'sizes') @@ -748,6 +768,9 @@ class Builder: commit_upto (int): Commit number to use (0..self.count-1) target (str): Target name elf_fname (str): Filename of elf image + + Returns: + str: Path to the funcsizes file """ return os.path.join(self.get_build_dir(commit_upto, target), f"{elf_fname.replace('/', '-')}.sizes") @@ -759,6 +782,9 @@ class Builder: commit_upto (int): Commit number to use (0..self.count-1) target (str): Target name elf_fname (str): Filename of elf image + + Returns: + str: Path to the objdump file """ return os.path.join(self.get_build_dir(commit_upto, target), f"{elf_fname.replace('/', '-')}.objdump") @@ -769,6 +795,9 @@ class Builder: Args: commit_upto (int): Commit number to use (0..self.count-1) target (str): Target name + + Returns: + str: Path to the err file """ output_dir = self.get_build_dir(commit_upto, target) return os.path.join(output_dir, 'err') @@ -1983,6 +2012,9 @@ class Builder: Args: thread_num (int): Number of thread to check (-1 for main process, which is treated as 0) + + Returns: + str: Path to the thread's working directory """ if self.work_in_output: return self._working_dir