doc: extensions: api_overview: improve some comprehensive lists
Some comprehensive lists were hard to read, improve the code a bit so that things make more sense. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
602290e838
commit
29257f60fe
1 changed files with 6 additions and 11 deletions
|
|
@ -14,9 +14,9 @@ from sphinx.util.docutils import SphinxDirective
|
|||
def get_group(innergroup, all_groups):
|
||||
try:
|
||||
return [
|
||||
g
|
||||
for g in all_groups
|
||||
if g.get_compounddef()[0].get_id() == innergroup.get_refid()
|
||||
group
|
||||
for group in all_groups
|
||||
if group.get_compounddef()[0].get_id() == innergroup.get_refid()
|
||||
][0]
|
||||
except IndexError as e:
|
||||
raise Exception(f"Unexpected group {innergroup.get_refid()}") from e
|
||||
|
|
@ -49,15 +49,10 @@ class ApiOverview(SphinxDirective):
|
|||
def run(self):
|
||||
groups = parse_xml_dir(self.config.api_overview_doxygen_out_dir + "/xml")
|
||||
|
||||
inners = [group.get_compounddef()[0].get_innergroup() for group in groups]
|
||||
inner_ids = [i.get_refid() for inner in inners for i in inner]
|
||||
toplevel = [
|
||||
g
|
||||
for g in groups
|
||||
if g.get_compounddef()[0].get_id()
|
||||
not in [
|
||||
i.get_refid()
|
||||
for h in [j.get_compounddef()[0].get_innergroup() for j in groups]
|
||||
for i in h
|
||||
]
|
||||
group for group in groups if group.get_compounddef()[0].get_id() not in inner_ids
|
||||
]
|
||||
|
||||
return [self.generate_table(toplevel, groups)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue