clearml-server/apiserver/utilities/stringenum.py

15 lines
299 B
Python
Raw Permalink Normal View History

from enum import Enum
2021-05-03 14:36:04 +00:00
class StringEnum(str, Enum):
def __str__(self):
return self.value
2021-05-03 14:36:04 +00:00
@classmethod
def values(cls):
return list(map(str, cls))
# noinspection PyMethodParameters
def _generate_next_value_(name, start, count, last_values):
2021-05-03 14:36:04 +00:00
return name