16 lines
319 B
Python
16 lines
319 B
Python
import abc
|
|
|
|
from image_prediction.transformer.transformer import Transformer
|
|
|
|
|
|
class Formatter(Transformer):
|
|
@abc.abstractmethod
|
|
def format(self, obj):
|
|
raise NotImplementedError
|
|
|
|
def transform(self, obj):
|
|
return self.format(obj)
|
|
|
|
def __call__(self, obj):
|
|
return self.format(obj)
|