mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yash Rai <yash2154rai@gmail.com>
To: corbet@lwn.net, mchehab+huawei@kernel.org
Cc: linux-kernel@vger.kernel.org, Yash Rai <yash2154rai@gmail.com>
Subject: [PATCH v2] tools/lib/python: kdoc: remove unused parameters from _fill_text() and _format_usage()
Date: Fri, 15 May 2026 17:12:16 +0530	[thread overview]
Message-ID: <20260515114216.72860-1-yash2154rai@gmail.com> (raw)

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 <yash2154rai@gmail.com>
---
 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):
         """
         Enrich positional arguments at usage: line.
         """
-- 
2.54.0


             reply	other threads:[~2026-05-15 11:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 11:42 Yash Rai [this message]
2026-05-25 20:40 ` Jonathan Corbet
2026-05-28  6:14   ` Yash Rai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260515114216.72860-1-yash2154rai@gmail.com \
    --to=yash2154rai@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®