Add readable enums

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
Andrey Berezin 2023-08-02 21:38:27 +03:00
parent 807235af95
commit e4878f4d1e
5 changed files with 22 additions and 10 deletions

View file

@ -1,4 +1,13 @@
from abc import ABCMeta
from enum import Enum
class HumanReadableEnum(Enum):
def __str__(self):
return self._name_
def __repr__(self):
return self._name_
class HumanReadableABCMeta(ABCMeta):