#NEWLINE# def task( * args , **kwargs ) : #NEWLINE# #INDENT# "\n    Decorator declaring the wrapped function to be a new-style task.\n\n    May be invoked as a simple, argument-less decorator (i.e. ``@task``) or\n    with arguments customizing its behavior (e.g. ``@task(alias='myalias')``).\n\n    Please see the :ref:`new-style task <task-decorator>` documentation for\n    details on how to use this decorator.\n\n    .. versionchanged:: 1.2\n        Added the ``alias``, ``aliases``, ``task_class`` and ``default``\n        keyword arguments. See :ref:`task-decorator-arguments` for details.\n    .. versionchanged:: 1.5\n        Added the ``name`` keyword argument.\n\n    .. seealso:: `~fabric.docs.unwrap_tasks`, `~fabric.tasks.WrappedCallableTask`\n    " #NEWLINE# invoked = bool ( ( ( not args ) or kwargs ) ) #NEWLINE# task_class = kwargs . pop ( 'task_class' , tasks . WrappedCallableTask ) #NEWLINE# if ( not invoked ) : #NEWLINE# #INDENT# ( func , args ) = ( args [ 0 ] , ( ) ) #NEWLINE# #UNINDENT# def wrapper( func ) : #NEWLINE# #INDENT# return task_class ( func , * args , ** kwargs ) #NEWLINE# #UNINDENT# return ( wrapper if invoked else wrapper ( func ) )