@samitouri / QOSamiQemu / commits / 26b9673e0e

qapi: remove implicit doc comment Plain section

Prior to this patch, we always create an empty Plain section. Removing this allows us to gradually phase out the "Plain" section in favor of "Intro" and "Details" sections while keeping "Plain" around for the interim churn during the series - meaning that we don't actually know at __init__ time which type of section we'll have first. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20260611042332.482979-12-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>

John Snow committed Jun 11, 2026 at 00:23 UTC 26b9673e0e34c7c9c13ed6084579bfa12070b920
2 files changed +1 -17
scripts/qapi/parser.py
+1 -3
@@ -730,9 +730,7 @@ class QAPIDoc:
730 # definition doc's symbol, None for free-form doc
731 self.symbol: Optional[str] = symbol
732 # the sections in textual order
733 - self.all_sections: List[QAPIDoc.Section] = [
734 - QAPIDoc.Section(info, QAPIDoc.Kind.PLAIN)
735 - ]
733 + self.all_sections: List[QAPIDoc.Section] = []
734 # dicts mapping parameter/feature names to their description
735 self._args: Dict[str, QAPIDoc.ArgSection] = {}
736 self._features: Dict[str, QAPIDoc.ArgSection] = {}
tests/qapi-schema/doc-good.out
-14
@@ -106,8 +106,6 @@ Examples:
106 - *verbatim*
107 - {braces}
108 doc symbol=Enum
109 - Plain
110 -
109 Member=one
110 The _one_ {and only}, description on the same line
111 Member=two
@@ -119,8 +117,6 @@ a member feature
117 Plain
118 @two is undocumented
119 doc symbol=Base
122 - Plain
123 -
120 Member=base1
121 description starts on a new line,
122 minimally indented
@@ -138,16 +134,10 @@ a feature
134 Feature=member-feat
135 a member feature
136 doc symbol=Variant2
141 - Plain
142 -
137 doc symbol=Object
144 - Plain
145 -
138 Feature=union-feat1
139 a feature
140 doc symbol=Alternate
149 - Plain
150 -
141 Member=i
142 description starts on the same line
143 remainder indented the same
@@ -161,8 +151,6 @@ doc freeform
151 Another subsection
152 ==================
153 doc symbol=cmd
164 - Plain
165 -
154 Member=arg1
155 description starts on a new line,
156 indented
@@ -223,7 +211,5 @@ another feature
211
212 <- ... has no title ...
213 doc symbol=EVT_BOXED
226 - Plain
227 -
214 Feature=feat3
215 a feature