def execute(self, env, args):

        # extract args
        old_task_name = args.old_task_name
        new_task_name = args.new_task_name

        if old_task_name == new_task_name:
            raise errors.FocusError(u'Could not rename task to itself')

        if env.task.active and env.task.name == old_task_name:
            raise errors.ActiveTask

        env.task.rename(old_task_name, new_task_name)
Removes a task.
dataset/ETHPy150Open xtrementl/focus/focus/plugin/modules/tasks.py/TaskRename.execute