diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-21 16:52:04 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-21 17:09:29 +0100 |
commit | c5e08fdb776e704b1f6a49e0f62fa08d2a0905a1 (patch) | |
tree | 3d13d5cecb65ef2d9d4ffa8b4e610dab3b3c18a4 | |
parent | b0a7d14a253be4a6c93eb9211a3c25469fa2211e (diff) | |
download | gobject-introspection-c5e08fdb776e704b1f6a49e0f62fa08d2a0905a1.tar.gz |
g-ir-doc-tool: Remove constructors from python docs
-rw-r--r-- | giscanner/mallardwriter.py | 3 | ||||
-rw-r--r-- | tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.new.page | 31 |
2 files changed, 2 insertions, 32 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py index a7154b59..9f11c60b 100644 --- a/giscanner/mallardwriter.py +++ b/giscanner/mallardwriter.py @@ -185,11 +185,12 @@ class MallardWriter(object): nodes.append(node) if isinstance(node, (ast.Class, ast.Interface, ast.Record)): nodes += getattr(node, 'methods', []) - nodes += getattr(node, 'constructors', []) nodes += getattr(node, 'static_methods', []) nodes += getattr(node, 'virtual_methods', []) nodes += getattr(node, 'properties', []) nodes += getattr(node, 'signals', []) + if self._language == 'C': + nodes += getattr(node, 'constructors', []) for node in nodes: self._render_node(node, output) diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.new.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.new.page deleted file mode 100644 index aa6f7466..00000000 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.new.page +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> - -<page id="DocExamples.Obj.new" - type="topic" - style="constructor" - xmlns="http://projectmallard.org/1.0/" - xmlns:api="http://projectmallard.org/experimental/api/" - xmlns:ui="http://projectmallard.org/experimental/ui/"> - <info> - <link type="guide" xref="DocExamples.Obj" group="constructor"/> - <api:function> - <api:returns> - <api:type>DocExamples.Obj</api:type> - </api:returns> - <api:name>doc_examples_obj_new</api:name> - </api:function> - </info> - <title>new</title> -<synopsis><code mime="text/x-python"> -@returns(DocExamples.Obj) -def new() -</code></synopsis> - - -<table> -<tr> -<td><p>Returns :</p></td> -<td></td> -</tr> -</table> -</page> |