From 426061e5eab0ffe80ea67c9a82e957680b83fa18 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Fri, 1 Apr 2022 12:20:32 +0200 Subject: [PATCH] applied black --- image_prediction/compositor/compositor.py | 1 - image_prediction/formatter/formatters/camel_case.py | 1 - image_prediction/formatter/formatters/enum.py | 1 - image_prediction/formatter/formatters/identity.py | 1 - image_prediction/formatter/formatters/key_formatter.py | 1 - image_prediction/formatter/formatters/response.py | 1 - image_prediction/label_mapper/mappers/probability.py | 1 - 7 files changed, 7 deletions(-) diff --git a/image_prediction/compositor/compositor.py b/image_prediction/compositor/compositor.py index b0226a8..aad3ad4 100644 --- a/image_prediction/compositor/compositor.py +++ b/image_prediction/compositor/compositor.py @@ -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) diff --git a/image_prediction/formatter/formatters/camel_case.py b/image_prediction/formatter/formatters/camel_case.py index 0b12781..01d011f 100644 --- a/image_prediction/formatter/formatters/camel_case.py +++ b/image_prediction/formatter/formatters/camel_case.py @@ -2,7 +2,6 @@ from image_prediction.formatter.formatters.key_formatter import KeyFormatter class Snake2CamelCaseKeyFormatter(KeyFormatter): - @staticmethod def format_key(key): diff --git a/image_prediction/formatter/formatters/enum.py b/image_prediction/formatter/formatters/enum.py index bd9f27d..b679279 100644 --- a/image_prediction/formatter/formatters/enum.py +++ b/image_prediction/formatter/formatters/enum.py @@ -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 diff --git a/image_prediction/formatter/formatters/identity.py b/image_prediction/formatter/formatters/identity.py index 8443f02..0eaca6a 100644 --- a/image_prediction/formatter/formatters/identity.py +++ b/image_prediction/formatter/formatters/identity.py @@ -2,6 +2,5 @@ from image_prediction.formatter.formatter import Formatter class IdentityFormatter(Formatter): - def format(self, obj): return obj diff --git a/image_prediction/formatter/formatters/key_formatter.py b/image_prediction/formatter/formatters/key_formatter.py index fbf0efd..e2ed3a3 100644 --- a/image_prediction/formatter/formatters/key_formatter.py +++ b/image_prediction/formatter/formatters/key_formatter.py @@ -5,7 +5,6 @@ from image_prediction.formatter.formatter import Formatter class KeyFormatter(Formatter): - @abc.abstractmethod def format_key(self, key): raise NotImplementedError diff --git a/image_prediction/formatter/formatters/response.py b/image_prediction/formatter/formatters/response.py index b345101..caa1ff8 100644 --- a/image_prediction/formatter/formatters/response.py +++ b/image_prediction/formatter/formatters/response.py @@ -6,7 +6,6 @@ from image_prediction.transformer.transformer import Transformer class ResponseTransformer(Transformer): - def transform(self, data): try: return build_image_info(data) diff --git a/image_prediction/label_mapper/mappers/probability.py b/image_prediction/label_mapper/mappers/probability.py index f201599..b2a0e63 100644 --- a/image_prediction/label_mapper/mappers/probability.py +++ b/image_prediction/label_mapper/mappers/probability.py @@ -14,7 +14,6 @@ class ProbabilityMapperKeys(Enum): PROBABILITIES = "probabilities" - class ProbabilityMapper(LabelMapper): def __init__(self, labels: Mapping[int, str]): self.__labels = labels