treat constructors like methods when generating the label
authorJohn (J5) Palmieri <johnp@redhat.com>
Mon, 15 Aug 2011 14:33:06 +0000 (10:33 -0400)
committerJohn (J5) Palmieri <johnp@redhat.com>
Mon, 15 Aug 2011 14:33:06 +0000 (10:33 -0400)
giscanner/mallardwriter.py

index 3c4d6c9..3c0f2fd 100644 (file)
@@ -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)