From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A9E35BDC7 for ; Mon, 25 May 2026 20:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779741662; cv=none; b=KDOtnM3PJHiETOHtyPhb7nQmr1FRtsGxGnXi+JKJAdn+bE0BSd2/NsGZ3dkd4rRdXCJmsW870KhlsNb6Zv/JpafBpcXh3vzHYQSD4v6t/i1nhlVj48b7huTe/1/vUz8pYaepbcxvyN0vRjZ7NBzLRY/3DoPhfwsqtTZCPLyxZ4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779741662; c=relaxed/simple; bh=8iBA4ocYFp8WXivofM7LtVYPkkpqXGuSKGIG93Tsug4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=QTtfqVxL2fIOYCrvl5u7CAtmIfU5W01Zn1Tk42q/MztKtMBIVPBShahrXCrcbGySweOpk0tb/CYXQ5TZwmWGoqM9zglRX3D00GxiHkCy4+IKNn4Wsaz/8ViE1Z3dvuRHesPgZxSxmI6OaFDmQlvw9Y6cEX3GcBhtlYpbR+bayeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=srF573ow; arc=none smtp.client-ip=45.79.88.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="srF573ow" DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 7B6D240E29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1779741660; bh=5nb3dS/XckoEPMYyQ5UZWvjtNOlwEfFWh3Lv0oHEOHw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=srF573owhjHRinGxojVQXDH1X2LmJpMqFUEugvEvVHwLzEsmVq4Gyt5mNBj7fpr2C Kq7X3L6e6ghCfrAoa0SJdTe0dSQpYD+SnGCvdMsNibGb7OT5rdb0jxhpGfji+sl7jt 5rU5E2KPPBcaDTj9W/KaK1KPR9SU1BKzKkGpKCmVpSRGQ1b0e29502/Hg2sWdYftgB c2sWN3FQs4C925SV14xa+uzrensVGp1J4IMJnbMVBMznZO0iGvezeZvGYs6S8Up2mk J7nVLbanORfGDGduWf9wLpW4N1EYhKPh48RpY+tpGtxoyRsZ+Ua+YAE+bOpqOD0tDq wumOVS96nklrg== Received: from localhost (unknown [IPv6:2601:280:4600:27b:67c:16ff:fe81:5f9b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 7B6D240E29; Mon, 25 May 2026 20:41:00 +0000 (UTC) From: Jonathan Corbet To: Yash Rai , mchehab+huawei@kernel.org Cc: linux-kernel@vger.kernel.org, Yash Rai Subject: Re: [PATCH v2] tools/lib/python: kdoc: remove unused parameters from _fill_text() and _format_usage() In-Reply-To: <20260515114216.72860-1-yash2154rai@gmail.com> References: <20260515114216.72860-1-yash2154rai@gmail.com> Date: Mon, 25 May 2026 14:40:59 -0600 Message-ID: <87a4tnz0h0.fsf@trenco.lwn.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Yash Rai writes: > The parameters 'width' in _fill_text() and 'usage', 'groups' in > _format_usage() are not used within these methods. Use *args and > **kwargs to properly handle them while maintaining the override > contract with argparse.HelpFormatter. > > This is a cleanup with no functional change. > > Signed-off-by: Yash Rai > --- > tools/lib/python/kdoc/enrich_formatter.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/lib/python/kdoc/enrich_formatter.py b/tools/lib/python/kdoc/enrich_formatter.py > index 7e0f09f5ccea..bd2321fa11ea 100644 > --- a/tools/lib/python/kdoc/enrich_formatter.py > +++ b/tools/lib/python/kdoc/enrich_formatter.py > @@ -42,14 +42,14 @@ class EnrichFormatter(argparse.HelpFormatter): > lambda m: f'\033[1m{m.group(1)}\033[0m', text) > return text > > - def _fill_text(self, text, indent): > + def _fill_text(self, text, indent, *args, **kwargs): > """ > Enrich descriptions with markups on it. > """ > enriched = self.enrich_text(text) > return "\n".join(indent + line for line in enriched.splitlines()) > > - def _format_usage(self, actions, prefix): > + def _format_usage(self, actions, prefix, *args, **kwargs): > """ This patch removes no parameters, and won't apply. You are, I'm guessing, applying this on top of your previous patch? Don't do that; send a completely new patch in response to review comments. I have to say, though, that I don't really see the value in this change; you're exchanging one set of unused parameters for a different, even more mysterious set. Why do we want to do that? Thanks, jon