(self, command: str)
return Variable(f'self.{func_name}', created_func)
Generates a command attached to a python function
Generates a command attached to a python function
Generates a command attached to a python function
def generate_command_func(self, command: str):
        '''
        Generates a command attached to a python function
        '''
        func_name = 'method_handler{}'.format(self.counter)
        created_func = ExistingCode.COMMAND_HANDLER_TEMPLATE.value.format(
            func_name, command, '')

        self.counter += 1

        return Variable(f'self.{func_name}', created_func)
def generate_command_func ( self , command : str ) : func_name = 'method_handler{}' . format ( self . counter ) created_func = ExistingCode . COMMAND_HANDLER_TEMPLATE . value . format ( func_name , command , '' ) self . counter += 1 return Variable ( f'self.{func_name}' , created_func )