summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/Python/class.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/doctemplates/Python/class.tmpl')
-rw-r--r--giscanner/doctemplates/Python/class.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/giscanner/doctemplates/Python/class.tmpl b/giscanner/doctemplates/Python/class.tmpl
new file mode 100644
index 00000000..435b31a5
--- /dev/null
+++ b/giscanner/doctemplates/Python/class.tmpl
@@ -0,0 +1,17 @@
+<%inherit file="/class.tmpl"/>
+<%block name="synopsis">
+ <synopsis><code>
+from gi.repository import ${namespace.name}
+
+${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
+% for ix, property_ in enumerate(node.properties):
+% if property_.construct or property_.construct_only or property_.writable:
+<link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>=value\
+% if ix != len(node.properties) - 1:
+, \
+% endif
+% endif
+% endfor
+)\
+ </code></synopsis>
+</%block>