From patchwork Sat Feb 14 03:26:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1875 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=1771039614; bh=6eD3CgXVvOhEQ4fc3wcoL4I7N/Q27OLp//kD4uIwkKs=; 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=JZPgEC1qEqa+rqnYicnSMRH3J9keOBr1pEqKBPNNEIwmxrc3+yPc/pIV4Oop2z77m SeTlOG3hp/mBZey8jSU81dE7Bd1m49g+sImxgMUoM2BKFSDzmd1b0NSAXayGuFZ2qu Ivuig4OY7ADnxKTv2f+k3Q3dON2pu2AAe53JU49pQ6kMc9Dzi/raiOdsOLuPRQLoc6 7QRzlCILtd77VqxgIL6mAl2LarYZPBRGI27WEiib07/z6CJ+SugtSEQNvNfn7uzAIk 8zWpHIngDzf7qrbKj06Ly3CMXELMyMHHPGZsHq7E8DyAl3xAqFsl4OhjDrFj3pEzpM IapfusgKdOEVA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D53B469B71 for ; Fri, 13 Feb 2026 20:26:54 -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 3f3aKckNhll9 for ; Fri, 13 Feb 2026 20:26:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039614; bh=6eD3CgXVvOhEQ4fc3wcoL4I7N/Q27OLp//kD4uIwkKs=; 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=JZPgEC1qEqa+rqnYicnSMRH3J9keOBr1pEqKBPNNEIwmxrc3+yPc/pIV4Oop2z77m SeTlOG3hp/mBZey8jSU81dE7Bd1m49g+sImxgMUoM2BKFSDzmd1b0NSAXayGuFZ2qu Ivuig4OY7ADnxKTv2f+k3Q3dON2pu2AAe53JU49pQ6kMc9Dzi/raiOdsOLuPRQLoc6 7QRzlCILtd77VqxgIL6mAl2LarYZPBRGI27WEiib07/z6CJ+SugtSEQNvNfn7uzAIk 8zWpHIngDzf7qrbKj06Ly3CMXELMyMHHPGZsHq7E8DyAl3xAqFsl4OhjDrFj3pEzpM IapfusgKdOEVA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C564D69B5C for ; Fri, 13 Feb 2026 20:26:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039612; bh=8yXBlY6fbpLzoW443X9GdX2TfI7eFvcSjxAFNmhH61s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paeufGxhrjbpZQdIb98lgV3eSqKUdXEGC6qKYv9m1lrOTn1ZwyHu+Ke2iDjL8FcG3 TY8MWM3raKdF81apD6H/ZpMmflS7jf1PK+4CQ6qVI/55tMjJUxsjIn2LWkaKUvPZR8 h8I9eYcaYd1zVWb3kJ1Z7x+v4+3l6m602E4QOobuitPhVUWNBbJEFP5N6bKsgVLoDa slCgIUye10/WDIjkD53xjXG0g92kpsuMv/CvtW4+zazWOCom8hXi7pCdRyf6KSUVxP 2K0DXaSXdnnWDKYiAy5gyClhgC+WVlV5Nb5ya2LEoay5ff6GDYa5E4dmQ0eJAz+L4Z B2NjnPqZKUubA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5635E69B31; Fri, 13 Feb 2026 20:26:52 -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 ESxQvhZ7D8wx; Fri, 13 Feb 2026 20:26:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039608; bh=DRzIoxI+AOpvI3KoLC1mif2jELEALgCTTlX6AHnf5XA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mja1EZG/1kE0363r671Se8vJS9pvD2JZoDklOuj8MMq106muBQ9EmFqF0c8aQrAlu 3LMXp//EYN4zZ2CF+A55MIDpVGpWs4ymGSegESURkUki9b4zsWAnLTVLq6XcgNC2c/ ESO3t1+twcBOIQ9UIfmMvQ90q0NF+cMl2difi74swbHDHMceJYnIhgFCpEwjGXhPlk DxVxGrqptjz4diA9KR39XLsT6DcdNV8vdcHUKixbhIJeRkCE62fjo+fWvPOeQf1Yr4 TOQYF4I1JJtTseWKjJn6lMxtiENrW33M96VN88smbkRPH28/LBnoPE1EXGvGhxvn+W t+hJbKRaMmenA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E03BE69A69; Fri, 13 Feb 2026 20:26:47 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:21 -0700 Message-ID: <20260214032632.3957279-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260214032632.3957279-1-sjg@u-boot.org> References: <20260214032632.3957279-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: HQQU4TCTJDKULWV3CO3B53B3AD325RXT X-Message-ID-Hash: HQQU4TCTJDKULWV3CO3B53B3AD325RXT 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 . 6" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 2/7] patman: Add plural() helper to CseriesHelper 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 a simple helper method that returns 's' when a value is not 1, for use in formatting plural strings. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/cser_helper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/patman/cser_helper.py b/tools/patman/cser_helper.py index ec44357c252..ea9881fcf6f 100644 --- a/tools/patman/cser_helper.py +++ b/tools/patman/cser_helper.py @@ -304,6 +304,13 @@ class CseriesHelper: series.idnum = in_series.idnum series.name = in_series.name + def plural(self, val): + """Returns a string to make something plural + + So far this is very simple and just returns an 's' when needed + """ + return '' if val == 1 else 's' + def _handle_mark(self, branch_name, in_series, version, mark, allow_unmarked, force_version, dry_run): """Handle marking a series, checking for unmarked commits, etc.