From 1751c105dc22048ce8dcc7ae67f7fca7a0f2af0c Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Mon, 15 Aug 2011 10:33:06 -0400 Subject: [PATCH] treat constructors like methods when generating the label --- giscanner/mallardwriter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py index 3c4d6c9..3c0f2fd 100644 --- a/giscanner/mallardwriter.py +++ b/giscanner/mallardwriter.py @@ -265,7 +265,7 @@ class MallardFormatterPython(MallardFormatter): if isinstance(node, ast.Namespace): return "%s Documentation" % node.name elif isinstance(node, ast.Function): - if node.is_method: + if node.is_method and node.is_constructor: return "%s.%s.%s" % (node.namespace.name, parent.name, node.name) else: return "%s.%s" % (node.namespace.name, node.name) -- 2.7.4