summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
blob: cf51f7c71194d1740e56e8525b18b64a993820b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%inherit file="mallard-base.tmpl"/>
<%block name="synopsis">
<synopsis><code mime="text/x-python">
% if len(node.parameters) != 0:
@accepts(\
${', '.join((formatter.format_type(arg.type) for arg in node.parameters))}\
)
% endif
@returns(${formatter.format_type(node.retval.type) | x})
def \
do_${node.name}(self, \
${', '.join((arg.argname for arg in node.parameters))}\
):
</code></synopsis>
</%block>
<%block name="details">
% if node.parameters or node.retval:
<dl>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
<dt><p>${arg.argname} :</p></dt>
<dd>${formatter.format(node, arg.doc)}</dd>
% endfor
% if node.retval and node.retval.type.ctype != 'void':
<dt><p>Returns :</p></dt>
<dd>${formatter.format(node, node.retval.doc)}</dd>
% endif
</dl>
% endif
</%block>