summaryrefslogtreecommitdiff
path: root/tools/lib/python/feat
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-09 20:53:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-09 20:53:18 -0800
commit72c395024dac5e215136cbff793455f065603b06 (patch)
tree4c7bb2eaab08e2e827607effdedcb42f808e496c /tools/lib/python/feat
parent0c61526621ec1916527d6f6226d8a466340cca22 (diff)
parent0a83293322fde69f1fb4722bd3c79c2d52eef436 (diff)
Merge tag 'docs-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linux
Pull documentation updates from Jonathan Corbet: "A slightly calmer cycle for docs this time around, though there is still a fair amount going on, including: - Some signs of life on the long-moribund Japanese translation - Documentation on policies around the use of generative tools for patch submissions, and a separate document intended for consumption by generative tools - The completion of the move of the documentation tools to tools/docs. For now we're leaving a /scripts/kernel-doc symlink behind to avoid breaking scripts - Ongoing build-system work includes the incorporation of documentation in Python code, better support for documenting variables, and lots of improvements and fixes - Automatic linking of man-page references -- cat(1), for example -- to the online pages in the HTML build ...and the usual array of typo fixes and such" * tag 'docs-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linux: (107 commits) doc: development-process: add notice on testing tools: sphinx-build-wrapper: improve its help message docs: sphinx-build-wrapper: allow -v override -q docs: kdoc: Fix pdfdocs build for tools docs: ja_JP: process: translate 'Obtain a current source tree' docs: fix 're-use' -> 'reuse' in documentation docs: ioctl-number: fix a typo in ioctl-number.rst docs: filesystems: ensure proc pid substitutable is complete docs: automarkup.py: Skip common English words as C identifiers Documentation: use a source-read extension for the index link boilerplate docs: parse_features: make documentation more consistent docs: add parse_features module documentation docs: jobserver: do some documentation improvements docs: add jobserver module documentation docs: kabi: helpers: add documentation for each "enum" value docs: kabi: helpers: add helper for debug bits 7 and 8 docs: kabi: system_symbols: end docstring phrases with a dot docs: python: abi_regex: do some improvements at documentation docs: python: abi_parser: do some improvements at documentation docs: add kabi modules documentation ...
Diffstat (limited to 'tools/lib/python/feat')
-rwxr-xr-xtools/lib/python/feat/parse_features.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/tools/lib/python/feat/parse_features.py b/tools/lib/python/feat/parse_features.py
index b88c04d3e2fe..41a51d9d6f62 100755
--- a/tools/lib/python/feat/parse_features.py
+++ b/tools/lib/python/feat/parse_features.py
@@ -21,14 +21,25 @@ class ParseFeature:
from it.
"""
+ #: feature header string.
h_name = "Feature"
+
+ #: Kernel config header string.
h_kconfig = "Kconfig"
+
+ #: description header string.
h_description = "Description"
+
+ #: subsystem header string.
h_subsys = "Subsystem"
+
+ #: status header string.
h_status = "Status"
+
+ #: architecture header string.
h_arch = "Architecture"
- # Sort order for status. Others will be mapped at the end.
+ #: Sort order for status. Others will be mapped at the end.
status_map = {
"ok": 0,
"TODO": 1,
@@ -40,7 +51,7 @@ class ParseFeature:
def __init__(self, prefix, debug=0, enable_fname=False):
"""
- Sets internal variables
+ Sets internal variables.
"""
self.prefix = prefix
@@ -63,11 +74,13 @@ class ParseFeature:
self.msg = ""
def emit(self, msg="", end="\n"):
+ """Helper function to append a new message for feature output."""
+
self.msg += msg + end
def parse_error(self, fname, ln, msg, data=None):
"""
- Displays an error message, printing file name and line
+ Displays an error message, printing file name and line.
"""
if ln:
@@ -82,7 +95,7 @@ class ParseFeature:
print("", file=sys.stderr)
def parse_feat_file(self, fname):
- """Parses a single arch-support.txt feature file"""
+ """Parses a single arch-support.txt feature file."""
if os.path.isdir(fname):
return
@@ -204,7 +217,7 @@ class ParseFeature:
self.max_size_arch_with_header = self.max_size_arch + len(self.h_arch)
def parse(self):
- """Parses all arch-support.txt feature files inside self.prefix"""
+ """Parses all arch-support.txt feature files inside self.prefix."""
path = os.path.expanduser(self.prefix)
@@ -281,7 +294,7 @@ class ParseFeature:
def output_feature(self, feat):
"""
- Output a feature on all architectures
+ Output a feature on all architectures.
"""
title = f"Feature {feat}"
@@ -331,7 +344,7 @@ class ParseFeature:
def matrix_lines(self, desc_size, max_size_status, header):
"""
- Helper function to split element tables at the output matrix
+ Helper function to split element tables at the output matrix.
"""
if header: