fabric/fabric — Issue #495: Custom subclass alias broken
Author: bretth
Created: 2011-12-11 04:06:36+00:00
State: open

In the documentation for tasks "Using custom subclasses with @task", raises an error:
TypeError: __init__() got an unexpected keyword argument 'alias'.

from fabric.api import task
from fabric.tasks import Task

class CustomTask(Task):
def __init__(self, func, myarg):
self.func = func
self.myarg = myarg

def run(self, *args, **kwargs):
return self.func(*args, **kwargs)

@task(task_class=CustomTask, myarg='value', alias='at')
def actual_task():
pass