class.tmpl 593 B

123456789101112131415161718
  1. <%inherit file="/class.tmpl"/>
  2. <%block name="synopsis">
  3. <synopsis><code>
  4. from gi.repository import ${namespace.name}
  5. ${formatter.to_underscores(node).lower()} = ${namespace.name}.${node.name}(\
  6. % if isinstance(node, (ast.Class, ast.Interface)):
  7. % for ix, property_ in enumerate(node.properties):
  8. % if property_.construct or property_.construct_only or property_.writable:
  9. <link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>=value\
  10. % if ix != len(node.properties) - 1:
  11. , \
  12. % endif
  13. % endif
  14. % endfor
  15. % endif
  16. )
  17. </code></synopsis></%block>