diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2011-08-15 10:19:41 -0400 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2011-08-15 10:22:16 -0400 |
commit | 45fd6f6af66e770b6205a65de11982efa5e2cca0 (patch) | |
tree | 1a9c9ac93da4ae3d0662dd270842de4cf8bb5d86 | |
parent | 79b9346d0a697a8065fc9f0a78f39401c8655e55 (diff) | |
download | gobject-introspection-45fd6f6af66e770b6205a65de11982efa5e2cca0.tar.gz |
[doctool] use different templates for method vs. function output
-rw-r--r-- | giscanner/mallardwriter.py | 5 |
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): |