mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: [PATCH v2 08/15] docs: kdoc_item: Improve docstrings and comments
Date: Thu, 15 Jan 2026 16:40:29 +0100	[thread overview]
Message-ID: <a68daefd2db512f220b615e0d2e3be30fbf49d1e.1768488832.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1768488832.git.mchehab+huawei@kernel.org>

In preparation to document kernel-doc module, improve its
documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 tools/lib/python/kdoc/kdoc_item.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/lib/python/kdoc/kdoc_item.py b/tools/lib/python/kdoc/kdoc_item.py
index 19805301cb2c..2b8a93f79716 100644
--- a/tools/lib/python/kdoc/kdoc_item.py
+++ b/tools/lib/python/kdoc/kdoc_item.py
@@ -4,7 +4,16 @@
 # then pass into the output modules.
 #
 
+"""
+Data class to store a kernel-doc Item.
+"""
+
 class KdocItem:
+    """
+    A class that will, eventually, encapsulate all of the parsed data that we
+    then pass into the output modules.
+    """
+
     def __init__(self, name, fname, type, start_line, **other_stuff):
         self.name = name
         self.fname = fname
@@ -24,6 +33,9 @@ class KdocItem:
         self.other_stuff = other_stuff
 
     def get(self, key, default = None):
+        """
+        Get a value from optional keys.
+        """
         return self.other_stuff.get(key, default)
 
     def __getitem__(self, key):
@@ -33,10 +45,16 @@ class KdocItem:
     # Tracking of section and parameter information.
     #
     def set_sections(self, sections, start_lines):
+        """
+        Set sections and start lines.
+        """
         self.sections = sections
         self.section_start_lines = start_lines
 
     def set_params(self, names, descs, types, starts):
+        """
+        Set parameter list: names, descriptions, types and start lines.
+        """
         self.parameterlist = names
         self.parameterdescs = descs
         self.parametertypes = types
-- 
2.52.0


  parent reply	other threads:[~2026-01-15 15:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 15:40 [PATCH v2 00/15] Add kernel-doc modules to Documentation/tools Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 01/15] docs: custom.css: prevent li marker to override text Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 02/15] docs: conf.py: don't use doctree with a different meaning Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 03/15] docs: conf: don't rely on cwd to get documentation location Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 04/15] docs: enable Sphinx autodoc extension to allow documenting python Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 05/15] docs: custom.css: add CSS for python Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 06/15] docs: kdoc: latex_fonts: Improve docstrings and comments Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 07/15] docs: kdoc_files: " Mauro Carvalho Chehab
2026-01-15 15:40 ` Mauro Carvalho Chehab [this message]
2026-01-15 15:40 ` [PATCH v2 09/15] docs: kdoc_parser: " Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 10/15] docs: kdoc_output: " Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 11/15] docs: kdoc_re: " Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 12/15] docs: kdoc: parse_data_structs: " Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 13/15] docs: kdoc: enrich_formatter: " Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 14/15] docs: kdoc: python_version: " Mauro Carvalho Chehab
2026-01-15 15:40 ` [PATCH v2 15/15] docs: add kernel-doc modules documentation Mauro Carvalho Chehab

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=a68daefd2db512f220b615e0d2e3be30fbf49d1e.1768488832.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@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®