From 45fd6f6af66e770b6205a65de11982efa5e2cca0 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Mon, 15 Aug 2011 10:19:41 -0400 Subject: [PATCH] [doctool] use different templates for method vs. function output --- giscanner/mallardwriter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.34.1