File: docstrings.rst.jinja2

package info (click to toggle)
python-xsdata 24.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,936 kB
  • sloc: python: 29,257; xml: 404; makefile: 27; sh: 6
file content (9 lines) | stat: -rw-r--r-- 360 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
{% set offset = (level + 1) * 4 + 7 -%}
{% set is_enum = obj.is_enumeration -%}
{% set prefix = "cvar" if is_enum else "ivar" -%}
{{ '"""{}"""'.format(obj.help | clean_docstring) }}
{% if obj.has_help_attr %}
{%- for var_name, var_doc in obj | class_params %}
{{ ":{} {}: {}".format(prefix, var_name, var_doc) | text_wrap(offset) }}
{%- endfor %}
{%- endif %}