Skip to content

Commit

Permalink
@task now officially documented in /usage/tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jul 11, 2011
1 parent b0b726a commit c10dba4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/usage/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ The quickest way to make use of new-style task features is to wrap basic task fu

When this decorator is used, it signals to Fabric that *only* functions wrapped in the decorator are to be loaded up as valid tasks. (When not present, :ref:`classic-style task <classic-tasks>` behavior kicks in.)

.. _task-decorator-arguments:

Arguments
~~~~~~~~~

Expand Down
10 changes: 5 additions & 5 deletions fabric/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

def task(*args, **kwargs):
"""
Decorator declaring the wrapped function as a :ref:`new-style task <new-style-tasks>`.
Decorator declaring the wrapped function to be a new-style task.
You can provide a ``task_class`` to change what class you want to use for
your base class. It defaults to ``tasks.WrappedCallableTask``.
May be invoked as a simple, argument-less decorator (i.e. ``@task``) or
with arguments customizing its behavior (e.g. ``@task(alias='myalias')``).
Any values you provide to the ``args`` and ``kwargs`` keyword arguments are
provide to the ``task_class`` as parameters for its ``__init__`` method.
Please see the :ref:`new-style task <task-decorator>` documentation for
details on how to use this decorator.
.. versionchanged:: 1.2.0.dev
"""
Expand Down

0 comments on commit c10dba4

Please sign in to comment.