Sort methods
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -33,8 +33,15 @@ class BaseTransformation(object):
|
|||||||
return result.hexdigest()
|
return result.hexdigest()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(cls, transformation):
|
def get(cls, name):
|
||||||
cls._registry[transformation.name] = transformation
|
return cls._registry[name]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_label(cls):
|
||||||
|
if cls.arguments:
|
||||||
|
return string_concat(cls.label, ': ', ', '.join(cls.arguments))
|
||||||
|
else:
|
||||||
|
return cls.label
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_transformation_choices(cls):
|
def get_transformation_choices(cls):
|
||||||
@@ -45,15 +52,8 @@ class BaseTransformation(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get(cls, name):
|
def register(cls, transformation):
|
||||||
return cls._registry[name]
|
cls._registry[transformation.name] = transformation
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def get_label(cls):
|
|
||||||
if cls.arguments:
|
|
||||||
return string_concat(cls.label, ': ', ', '.join(cls.arguments))
|
|
||||||
else:
|
|
||||||
return cls.label
|
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.kwargs = {}
|
self.kwargs = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user