File: Enum.jinja2

package info (click to toggle)
python-datamodel-code-generator 0.26.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 712 kB
  • sloc: python: 9,525; makefile: 14
file content (17 lines) | stat: -rw-r--r-- 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{% for decorator in decorators -%}
{{ decorator }}
{% endfor -%}
class {{ class_name }}({{ base_class }}):
{%- if description %}
    """
    {{ description | indent(4) }}
    """
{%- endif %}
{%- for field in fields %}
    {{ field.name }} = {{ field.default }}
    {%- if field.docstring %}
    """
    {{ field.docstring | indent(4) }}
    """
    {%- endif %}
{%- endfor -%}