12 lines
292 B
Python
12 lines
292 B
Python
from enum import Enum
|
|
|
|
from image_prediction.formatter.formatters.key_formatter import KeyFormatter
|
|
|
|
|
|
class EnumFormatter(KeyFormatter):
|
|
def format_key(self, key):
|
|
return key.value if isinstance(key, Enum) else key
|
|
|
|
def transform(self, obj):
|
|
raise NotImplementedError
|