summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2012-02-21 18:16:00 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2012-02-21 18:16:00 +0100
commitb274afe8d031ab928727607231ace3f1564c4772 (patch)
treedb5255c2d337a71846edcdc2fa555fe621758730
parentf9eb570c8b3dc34c2844e47c57b67146af48bedc (diff)
downloadgobject-introspection-b274afe8d031ab928727607231ace3f1564c4772.tar.gz
g-ir-doc-tool: Remove class structs from Python docs
-rw-r--r--giscanner/mallardwriter.py4
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.ObjClass.page12
2 files changed, 4 insertions, 12 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index bb268be7..e596eca8 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -182,6 +182,10 @@ class MallardWriter(object):
continue
if getattr(node, 'disguised', False):
continue
+ if isinstance(node, ast.Record) and \
+ self._language == 'Python' and \
+ node.is_gtype_struct_for is not None:
+ continue
nodes.append(node)
if isinstance(node, (ast.Class, ast.Interface, ast.Record)):
nodes += getattr(node, 'methods', [])
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.ObjClass.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.ObjClass.page
deleted file mode 100644
index 32b131c5..00000000
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.ObjClass.page
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<page id="DocExamples.ObjClass"
- type="guide"
- style="record"
- xmlns="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/experimental/ui/">
- <info>
- <link type="guide" xref="index"/>
- </info>
- <title>DocExamplesObjClass</title>
- <p>None</p>
-</page>