applied black
This commit is contained in:
parent
7c2cf44ad0
commit
426061e5ea
@ -4,7 +4,6 @@ from image_prediction.transformer.transformer import Transformer
|
||||
|
||||
|
||||
class TransformerCompositor(Transformer):
|
||||
|
||||
def __init__(self, formatter: Transformer, *formatters: Transformer):
|
||||
formatters = (formatter, *formatters)
|
||||
self.pipe = rcompose(*formatters)
|
||||
|
||||
@ -2,7 +2,6 @@ from image_prediction.formatter.formatters.key_formatter import KeyFormatter
|
||||
|
||||
|
||||
class Snake2CamelCaseKeyFormatter(KeyFormatter):
|
||||
|
||||
@staticmethod
|
||||
def format_key(key):
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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
|
||||
|
||||
|
||||
@ -2,6 +2,5 @@ from image_prediction.formatter.formatter import Formatter
|
||||
|
||||
|
||||
class IdentityFormatter(Formatter):
|
||||
|
||||
def format(self, obj):
|
||||
return obj
|
||||
|
||||
@ -5,7 +5,6 @@ from image_prediction.formatter.formatter import Formatter
|
||||
|
||||
|
||||
class KeyFormatter(Formatter):
|
||||
|
||||
@abc.abstractmethod
|
||||
def format_key(self, key):
|
||||
raise NotImplementedError
|
||||
|
||||
@ -6,7 +6,6 @@ from image_prediction.transformer.transformer import Transformer
|
||||
|
||||
|
||||
class ResponseTransformer(Transformer):
|
||||
|
||||
def transform(self, data):
|
||||
try:
|
||||
return build_image_info(data)
|
||||
|
||||
@ -14,7 +14,6 @@ class ProbabilityMapperKeys(Enum):
|
||||
PROBABILITIES = "probabilities"
|
||||
|
||||
|
||||
|
||||
class ProbabilityMapper(LabelMapper):
|
||||
def __init__(self, labels: Mapping[int, str]):
|
||||
self.__labels = labels
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user