lenticular_cloud2/specs/api_template/int_enum.py.jinja

10 lines
224 B
Plaintext
Raw Normal View History

from enum import IntEnum
class {{ enum.class_info.name }}(IntEnum):
{% for key, value in enum.values.items() %}
{{ key }} = {{ value }}
{% endfor %}
def __str__(self) -> str:
return str(self.value)