forked from TrueCloudLab/frostfs-testlib
Add readable enums
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
807235af95
commit
e4878f4d1e
5 changed files with 22 additions and 10 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue