From c5e08fdb776e704b1f6a49e0f62fa08d2a0905a1 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 21 Feb 2012 16:52:04 +0100 Subject: g-ir-doc-tool: Remove constructors from python docs --- giscanner/mallardwriter.py | 3 ++- .../DocExamples.Obj.new.page | 31 ---------------------- 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.new.page 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 @@ - - - - - - - - DocExamples.Obj - - doc_examples_obj_new - - - new - -@returns(DocExamples.Obj) -def new() - - - - - - - - -

Returns :

-
-- cgit v1.2.1