From 3789d5cfcfeda32b33f01e21b0a82bf768a376aa Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 23 Apr 2019 19:27:10 -0400 Subject: [PATCH] Sort methods Signed-off-by: Roberto Rosario --- mayan/apps/converter/transformations.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mayan/apps/converter/transformations.py b/mayan/apps/converter/transformations.py index 365f4ae0b7..2aad214b62 100644 --- a/mayan/apps/converter/transformations.py +++ b/mayan/apps/converter/transformations.py @@ -33,8 +33,15 @@ class BaseTransformation(object): return result.hexdigest() @classmethod - def register(cls, transformation): - cls._registry[transformation.name] = transformation + def get(cls, name): + 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 def get_transformation_choices(cls): @@ -45,15 +52,8 @@ class BaseTransformation(object): ) @classmethod - def get(cls, name): - return cls._registry[name] - - @classmethod - def get_label(cls): - if cls.arguments: - return string_concat(cls.label, ': ', ', '.join(cls.arguments)) - else: - return cls.label + def register(cls, transformation): + cls._registry[transformation.name] = transformation def __init__(self, **kwargs): self.kwargs = {}