summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2011-08-15 10:19:41 -0400
committerJohn (J5) Palmieri <johnp@redhat.com>2011-08-15 10:22:16 -0400
commit45fd6f6af66e770b6205a65de11982efa5e2cca0 (patch)
tree1a9c9ac93da4ae3d0662dd270842de4cf8bb5d86
parent79b9346d0a697a8065fc9f0a78f39401c8655e55 (diff)
downloadgobject-introspection-45fd6f6af66e770b6205a65de11982efa5e2cca0.tar.gz
[doctool] use different templates for method vs. function output
-rw-r--r--giscanner/mallardwriter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index d24786d0..3c4d6c9d 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -265,7 +265,10 @@ class MallardFormatterPython(MallardFormatter):
if isinstance(node, ast.Namespace):
return "%s Documentation" % node.name
elif isinstance(node, ast.Function):
- return "%s.%s.%s" % (node.namespace.name, parent.name, node.name)
+ if node.is_method:
+ return "%s.%s.%s" % (node.namespace.name, parent.name, node.name)
+ else:
+ return "%s.%s" % (node.namespace.name, node.name)
elif isinstance(node, ast.Property):
return "%s" % node.name
elif isinstance(node, ast.Signal):