From patchwork Wed Dec 17 02:27:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 946 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=1765938538; bh=+JaDiWLAfgDCOYUKD+319pd5GyKYJ6wUm7mpx9MhdTI=; 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=vodRs7CFtmToMm0i4NFCCQmTg8ZaUffjt5R7iHJNMnDwmnfZfwzU8iAKDtTOKA+F1 IDXj0Y3e9cthqpXPFglQX+r5cF6H08cWZMAsScSCwNG7+s9JOudrKYnWtRIOFn4AMO KqIZvkYTiYP2uBmRPHz1osYBxBK7smzGrGfeHD5S1V5ze6Vx0nheMlN3enaZ1JWkyb Elxk+54oBQZ9BIsn+lzw9HUpVv1pCPDZB+85mCFK/KSAJBs69jd9uHIG9OzF2LXJuu +pVTVzcykgRPIcrOLjNO/INaAhXXhPFG1mlZNnjn71jNmT2TZLt5g30Q4/8b3nxlbM e0IJbKqu1CsSA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B7C0268BB8 for ; Tue, 16 Dec 2025 19:28: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 RxVSuiZoyiQ7 for ; Tue, 16 Dec 2025 19:28:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938538; bh=+JaDiWLAfgDCOYUKD+319pd5GyKYJ6wUm7mpx9MhdTI=; 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=vodRs7CFtmToMm0i4NFCCQmTg8ZaUffjt5R7iHJNMnDwmnfZfwzU8iAKDtTOKA+F1 IDXj0Y3e9cthqpXPFglQX+r5cF6H08cWZMAsScSCwNG7+s9JOudrKYnWtRIOFn4AMO KqIZvkYTiYP2uBmRPHz1osYBxBK7smzGrGfeHD5S1V5ze6Vx0nheMlN3enaZ1JWkyb Elxk+54oBQZ9BIsn+lzw9HUpVv1pCPDZB+85mCFK/KSAJBs69jd9uHIG9OzF2LXJuu +pVTVzcykgRPIcrOLjNO/INaAhXXhPFG1mlZNnjn71jNmT2TZLt5g30Q4/8b3nxlbM e0IJbKqu1CsSA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A5EE668AFD for ; Tue, 16 Dec 2025 19:28:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938536; bh=bKSqNxju5bbMmQ6kIMMePTDttlbU8AeZCZwSxf+1dcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FP5BDhn3bHPXwpvJmvhsBE8LCCHezmxvu+QXI5csGrs4rBXIAJF6uj8K9EH8+IYHT QjMpGchcO11S9q5F+cyy2QJ8A1UlGOOuUdTXa+GHWmjef2+huOvRLybxvImeHNbGU7 PEHkTMMMbjiW+aBi3JXeUtCOkbqox/xN9jP+jzeZ1POu6574sedl1yIQXxiHH9SvGW yswtCKIqDqkmin0qiqeQmMaHgeg9o10JJ0bfwNI7Mbe4WnQRcE56BSuX+6d7SEX2MU lbpnDwLPwsiO613lulexUAah+5rPjrtQ2hiG8LIS/QcPQilTOfNFPjDLXcdhOq3Ypp lsHAtzFCdrkFA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D1D1268ABD; Tue, 16 Dec 2025 19:28: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 PI7W4ObSX1cs; Tue, 16 Dec 2025 19:28:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938532; bh=IExaNey6SHa9qAqgKEKmePaVHXVmrezbLUtPOpMXur8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VRILfiptMYeDsxnSDf1JZ5ma9znUxrnSfKjI3PWcLeIb0xoXrbXM7XVP54ggtOgJr 0iL4FCur61Q7T5+P5mY+Ri8Vt781VoimAM1EDBuWtppC7MwlrtwkwURmAmTGjws8Za mll3n35oakZdFf9uzmFqb75dzXGzgHKRY7lArRXGbba4FGzzyLxaUxZzzRrXclRDg0 PRUymffUnLQFFL7CPEkN3Y26EWQETtWlTDAcJ0Hf09xKeX1Os80eD2cz02LS2KutCk T3sTNaaGKw2myUW29fAl/XEjuVMb011zobmbVo255ofAXfP49gOCZwrbWJPRZXXFWw Ra6GbvmwMSqEQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 672946884F; Tue, 16 Dec 2025 19:28:52 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 16 Dec 2025 19:27:52 -0700 Message-ID: <20251217022823.392557-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251217022823.392557-1-sjg@u-boot.org> References: <20251217022823.392557-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LO6IDOGCXZQ7TZP5EVOSLM7GO6X7NN3L X-Message-ID-Hash: LO6IDOGCXZQ7TZP5EVOSLM7GO6X7NN3L 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 03/24] pickman: Fix pylint warnings 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 - Remove unused commit_hashes variable in agent.py - Add pylint disable for too-many-public-methods in database.py - Add pylint disable for too-many-arguments in database.py functions - Add pylint disable for too-many-branches in control.py do_apply() - Add pylint disable for too-many-lines in ftest.py - Prefix unused mock arguments with underscore in ftest.py This brings the pylint score to 10.00/10. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/pickman/agent.py | 1 - tools/pickman/control.py | 2 +- tools/pickman/database.py | 4 +++- tools/pickman/ftest.py | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/pickman/agent.py b/tools/pickman/agent.py index 76cf8f98ec3..176cf9773a0 100644 --- a/tools/pickman/agent.py +++ b/tools/pickman/agent.py @@ -60,7 +60,6 @@ async def run(commits, source, branch_name, repo_path=None): f' - {short_hash}: {subject}' for _, short_hash, subject in commits ) - commit_hashes = ' '.join(hash for hash, _, _ in commits) prompt = f"""Cherry-pick the following commits from {source} branch: diff --git a/tools/pickman/control.py b/tools/pickman/control.py index 0353bae9350..474315f7db0 100644 --- a/tools/pickman/control.py +++ b/tools/pickman/control.py @@ -299,7 +299,7 @@ def write_history(source, commits, branch_name, conversation_log): tout.info(f'Updated {HISTORY_FILE}') -def do_apply(args, dbs): # pylint: disable=too-many-locals +def do_apply(args, dbs): # pylint: disable=too-many-locals,too-many-branches """Apply the next set of commits using Claude agent Args: diff --git a/tools/pickman/database.py b/tools/pickman/database.py index 118ac5536fa..c8ed8a6df09 100644 --- a/tools/pickman/database.py +++ b/tools/pickman/database.py @@ -24,7 +24,7 @@ LATEST = 2 DB_FNAME = '.pickman.db' -class Database: +class Database: # pylint: disable=too-many-public-methods """Database of cherry-pick state used by pickman""" # dict of databases: @@ -248,6 +248,7 @@ class Database: # commit functions + # pylint: disable-next=too-many-arguments def commit_add(self, chash, source_id, subject, author, status='pending', mergereq_id=None): """Add a commit to the database @@ -348,6 +349,7 @@ class Database: # mergereq functions + # pylint: disable-next=too-many-arguments def mergereq_add(self, source_id, branch_name, mr_id, status, url, created_at): """Add a merge request to the database diff --git a/tools/pickman/ftest.py b/tools/pickman/ftest.py index 8e3b91df750..b479f2e0ecd 100644 --- a/tools/pickman/ftest.py +++ b/tools/pickman/ftest.py @@ -3,6 +3,7 @@ # Copyright 2025 Canonical Ltd. # Written by Simon Glass # +# pylint: disable=too-many-lines """Tests for pickman.""" import argparse