10 lines
239 B
Python
10 lines
239 B
Python
from enum import Enum
|
|
|
|
from image_prediction.formatter.formatters.key_formatter import KeyFormatter
|
|
|
|
|
|
class EnumFormatter(KeyFormatter):
|
|
@staticmethod
|
|
def format_key(key):
|
|
return key.value if isinstance(key, Enum) else key
|