diff options
Diffstat (limited to 'giscanner/docwriter.py')
-rw-r--r-- | giscanner/docwriter.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py index c18e8224..afad77b7 100644 --- a/giscanner/docwriter.py +++ b/giscanner/docwriter.py @@ -618,19 +618,16 @@ class DocFormatterGjs(DocFormatterIntrospectableBase): if isinstance(node, ast.Union) and node.name is None: return False if isinstance(node, ast.Class): - is_gobject = False - parent = node - while parent: - if parent.namespace.name == 'GObject' and \ - parent.name == 'Object': - is_gobject = True - break - if not parent.parent_type: - break - parent = self._transformer.lookup_typenode(parent.parent_type) - is_gparam = node.namespace.name == 'GObject' and \ - node.name == 'ParamSpec' - if not is_gobject and not is_gparam: + is_gparam_subclass = False + if node.parent_type: + parent = self._transformer.lookup_typenode(node.parent_type) + while parent: + if parent.namespace.name == 'GObject' and \ + parent.name == 'ParamSpec': + is_gparam_subclass = True + break + parent = self._transformer.lookup_typenode(parent.parent_type) + if is_gparam_subclass: return False if isinstance(node, ast.Function) and node.is_constructor: parent = node.parent |