mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-17 21:25:35 +00:00
Simple fix for duplicate children
This commit is contained in:
parent
aa59338a51
commit
21fbea84dc
@ -92,7 +92,7 @@ class DotNetDomain(AutoAPIDomain):
|
|||||||
'type': 'namespace'})
|
'type': 'namespace'})
|
||||||
self.app.env.autoapi_data.append(ns_obj)
|
self.app.env.autoapi_data.append(ns_obj)
|
||||||
self.namespaces[ns_obj.id] = ns_obj
|
self.namespaces[ns_obj.id] = ns_obj
|
||||||
if obj not in ns_obj.children:
|
if obj.id not in (child.id for child in ns_obj.children):
|
||||||
ns_obj.children.append(obj)
|
ns_obj.children.append(obj)
|
||||||
_recurse_ns(ns_obj)
|
_recurse_ns(ns_obj)
|
||||||
|
|
||||||
@ -109,7 +109,6 @@ class DotNetDomain(AutoAPIDomain):
|
|||||||
|
|
||||||
def generate_output(self):
|
def generate_output(self):
|
||||||
for obj in self.app.env.autoapi_data:
|
for obj in self.app.env.autoapi_data:
|
||||||
|
|
||||||
# TODO not here!
|
# TODO not here!
|
||||||
for child in obj.children:
|
for child in obj.children:
|
||||||
obj.item_map[child.type].append(child)
|
obj.item_map[child.type].append(child)
|
||||||
|
Loading…
Reference in New Issue
Block a user