summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/docwriter.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index d62425b2..ec998f5a 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -183,6 +183,14 @@ class DocFormatter(object):
def should_render_node(self, node):
if getattr(node, "private", False):
return False
+ # Nodes without namespace are AST bugs really
+ # They are used for structs and unions declared
+ # inline inside other structs, but they are not
+ # even picked up by g-ir-compiler, because they
+ # don't create a <type/> element.
+ # So just ignore them.
+ if isinstance(node, ast.Node) and node.namespace is None:
+ return False
return True
@@ -607,14 +615,6 @@ class DocFormatterGjs(DocFormatterIntrospectableBase):
len(node.methods) == len(node.static_methods) == len(node.constructors) == 0:
return False
- # Nodes without namespace are AST bugs really
- # They are used for structs and unions declared
- # inline inside other structs, but they are not
- # even picked up by g-ir-compiler, because they
- # don't create a <type/> element.
- # So just ignore them.
- if isinstance(node, ast.Node) and node.namespace is None:
- return False
if isinstance(node, ast.ErrorQuarkFunction):
return False
if isinstance(node, ast.Field):