from functools import partial


class ServiceBroker:

    def __init__(self, **settings):
        self.logger = settings.get('logger')

    __services = []

    def create_service(self, service):
        self.__services.append(service)

    def start(self):
        pass
        # for i in self.__services:
        #     print(i.name)


def action(name=None):

    print(f"Action with name: {name} was added")

    def real_decorator(function):
        def wrapper(*args, **kwargs):
            function(*args, **kwargs)
        return wrapper

    return real_decorator


class Service:
    pass


class Math(Service):

    name = "math"

    @action("add")
    def add(self, x: int, y: int) -> int:
        return x + y


def main():
    settings = {'logger': 'console'}
    broker = ServiceBroker(**settings)
    broker.create_service(Math)
    broker.start()

if __name__ == '__main__':
    main()

@@ -1,36 +1,4 @@
-from functools import partial%0A%0A%0A
 clas
@@ -230,23 +230,8 @@
     
- pass%0A        #
  for
@@ -264,10 +264,8 @@
     
- #
     
@@ -283,331 +283,229 @@
 me)%0A
-%0A%0Adef action(
+            print(i.actions)%0A%0A%0Aclass Service:%0A%0A    
 name
-=
+ = 
 None
-):%0A
 %0A    
-print(f%22Action with name: %7Bname%7D was added%22)%0A%0A    def real_decorator(function):%0A        def wrapper(*args, **kwargs):%0A            function(*args, **kwargs)%0A        return wrapper%0A%0A    return real_decorator%0A%0A%0Aclass Service:%0A    pass%0A%0A%0Aclass Math(Service):%0A%0A    name = %22math%22%0A%0A    @action(%22add%22)
+actions = %7B%7D%0A%0A%0Aclass Math(Service):%0A%0A    def __init__(self):%0A        self.name = %22math%22%0A        self.actions = %7B%0A            'sumadd': self.add%0A        %7D%0A
 %0A   
@@ -684,16 +684,18 @@
 ice(Math
+()
 )%0A    br

change type of registration services