class documentation

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_opts Undocumented
Method argspec Returns a modified `inspect.Signature` based on that of ``body``.
Method fill_implicit_positionals Undocumented
Method get_arguments 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_shortflags Undocumented
Instance Variable autoprint Undocumented
Instance Variable body Undocumented
Instance Variable help Undocumented
Instance Variable incrementable Undocumented
Instance Variable is_default Undocumented
Instance Variable iterable Undocumented
Instance Variable optional Undocumented
Instance Variable positional Undocumented
Instance Variable post Undocumented
Instance Variable pre Undocumented
Instance Variable times_called Undocumented
Property called Undocumented
Property name Undocumented
Instance Variable _name Undocumented
def __call__(self, *args, **kwargs): (source)

Undocumented

def __eq__(self, other): (source)

Undocumented

def __hash__(self): (source)

Undocumented

def __init__(self, body, name=None, aliases=(), positional=None, optional=(), default=False, auto_shortflags=True, help=None, pre=None, post=None, autoprint=False, iterable=None, incrementable=None): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def arg_opts(self, name, default, taken_names): (source)

Undocumented

def argspec(self, body): (source)

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`.

def fill_implicit_positionals(self, positional): (source)

Undocumented

def get_arguments(self, ignore_unknown_help=None): (source)

Return a list of Argument objects representing this task's signature. :param bool ignore_unknown_help: Controls whether unknown help flags cause errors. See the config option by the same name for details. .. versionadded:: 1.0 .. versionchanged:: 1.7 Added the ``ignore_unknown_help`` kwarg.

__module__ = (source)

Undocumented

__name__ = (source)

Undocumented

Undocumented

auto_shortflags = (source)

Undocumented

autoprint = (source)

Undocumented

Undocumented

Undocumented

incrementable = (source)

Undocumented

is_default = (source)

Undocumented

iterable = (source)

Undocumented

optional = (source)

Undocumented

positional = (source)

Undocumented

Undocumented

Undocumented

times_called: int = (source)

Undocumented

Undocumented

Undocumented

Undocumented