class Task: (source)
Core object representing an executable task & its argument specification. For the most part, this object is a clearinghouse for all of the data that may be supplied to the `@task <invoke.tasks.task>` decorator, such as ``name``, ``aliases``, ``positional`` etc, which appear as attributes. In addition, instantiation copies some introspection/documentation friendly metadata off of the supplied ``body`` object, such as ``__doc__``, ``__name__`` and ``__module__``, allowing it to "appear as" ``body`` for most intents and purposes. .. versionadded:: 1.0
Method | __call__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | arg |
Undocumented |
Method | argspec |
Returns a modified `inspect.Signature` based on that of ``body``. |
Method | fill |
Undocumented |
Method | get |
Return a list of Argument objects representing this task's signature. |
Instance Variable | __module__ |
Undocumented |
Instance Variable | __name__ |
Undocumented |
Instance Variable | aliases |
Undocumented |
Instance Variable | auto |
Undocumented |
Instance Variable | autoprint |
Undocumented |
Instance Variable | body |
Undocumented |
Instance Variable | help |
Undocumented |
Instance Variable | incrementable |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | iterable |
Undocumented |
Instance Variable | optional |
Undocumented |
Instance Variable | positional |
Undocumented |
Instance Variable | post |
Undocumented |
Instance Variable | pre |
Undocumented |
Instance Variable | times |
Undocumented |
Property | called |
Undocumented |
Property | name |
Undocumented |
Instance Variable | _name |
Undocumented |
Undocumented
Returns a modified `inspect.Signature` based on that of ``body``. :returns: an `inspect.Signature` matching that of ``body``, but with the initial context argument removed. :raises TypeError: if the task lacks an initial positional `.Context` argument. .. versionadded:: 1.0 .. versionchanged:: 2.0 Changed from returning a two-tuple of ``(arg_names, spec_dict)`` to returning an `inspect.Signature`.