Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: kdoc_item: Improve docstrings and comments

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

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <65a7c6bb318e7a8cbf5c115903d507568099151a.1768838938.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
f40bba94 8d08c7c6

+18
+18
tools/lib/python/kdoc/kdoc_item.py
··· 4 4 # then pass into the output modules. 5 5 # 6 6 7 + """ 8 + Data class to store a kernel-doc Item. 9 + """ 10 + 7 11 class KdocItem: 12 + """ 13 + A class that will, eventually, encapsulate all of the parsed data that we 14 + then pass into the output modules. 15 + """ 16 + 8 17 def __init__(self, name, fname, type, start_line, **other_stuff): 9 18 self.name = name 10 19 self.fname = fname ··· 33 24 self.other_stuff = other_stuff 34 25 35 26 def get(self, key, default = None): 27 + """ 28 + Get a value from optional keys. 29 + """ 36 30 return self.other_stuff.get(key, default) 37 31 38 32 def __getitem__(self, key): ··· 45 33 # Tracking of section and parameter information. 46 34 # 47 35 def set_sections(self, sections, start_lines): 36 + """ 37 + Set sections and start lines. 38 + """ 48 39 self.sections = sections 49 40 self.section_start_lines = start_lines 50 41 51 42 def set_params(self, names, descs, types, starts): 43 + """ 44 + Set parameter list: names, descriptions, types and start lines. 45 + """ 52 46 self.parameterlist = names 53 47 self.parameterdescs = descs 54 48 self.parametertypes = types