Re: [PATCH v3 03/16] qapi/docs: remove unused QAPIDoc subsection members
Markus Armbruster <[email protected]>
| Newsgroups | org.kernel.vger.linux-edac,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Uh, "qapi/docs:"? Shouldn't this be "qapi/parser:"? John Snow <[email protected]> writes: > All users of the QAPIDoc object should be iterating over all_sections > and not grabbing arbitrary subsections, if possible. Remove the 'body' > and 'sections' members, as they are no longer used. > > Signed-off-by: John Snow <[email protected]> > Reviewed-by: Markus Armbruster <[email protected]> > --- > scripts/qapi/parser.py | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py > index c3cf33904ef..b33edbba74f 100644 > --- a/scripts/qapi/parser.py > +++ b/scripts/qapi/parser.py > @@ -732,8 +732,6 @@ def __init__(self, info: QAPISourceInfo, symbol: Optional[str] = None): > self.all_sections: List[QAPIDoc.Section] = [ > QAPIDoc.Section(info, QAPIDoc.Kind.PLAIN) > ] > - # the body section > - self.body: Optional[QAPIDoc.Section] = self.all_sections[0] > # dicts mapping parameter/feature names to their description > self.args: Dict[str, QAPIDoc.ArgSection] = {} > self.features: Dict[str, QAPIDoc.ArgSection] = {} > @@ -742,8 +740,6 @@ def __init__(self, info: QAPISourceInfo, symbol: Optional[str] = None): > self.errors: Optional[QAPIDoc.Section] = None > # "Since" section > self.since: Optional[QAPIDoc.Section] = None > - # sections other than .body, .args, .features > - self.sections: List[QAPIDoc.Section] = [] > > def end(self) -> None: > for section in self.all_sections: > @@ -766,7 +762,6 @@ def ensure_untagged_section(self, info: QAPISourceInfo) -> None: > > # start new section > section = self.Section(info, kind) > - self.sections.append(section) > self.all_sections.append(section) > > def new_tagged_section( > @@ -790,7 +785,6 @@ def new_tagged_section( > raise QAPISemError( > info, "duplicated '%s' section" % kind) > self.since = section > - self.sections.append(section) > self.all_sections.append(section) > > def _new_description(