plugins#
Implementation for conda plugins subcommand.
Classes#
Return type to use when defining a conda subcommand plugin hook. |
Functions#
|
|
|
|
Attributes#
- hookimpl#
Decorator to mark plugin hook implementations, used to register plugins.
- class CondaSubcommand(*, name: str, summary: str, action: collections.abc.Callable[[argparse.Namespace], int | None], configure_parser: collections.abc.Callable[[argparse.ArgumentParser], None], aliases: str | collections.abc.Iterable[str] = ())#
- class CondaSubcommand(*, name: str, summary: str, action: collections.abc.Callable[[tuple[str, ...]], int | None], configure_parser: None = None, aliases: str | collections.abc.Iterable[str] = ())
Bases:
CondaPluginReturn type to use when defining a conda subcommand plugin hook.
For details on how this is used, see
conda_subcommands().Subcommands support two shapes, distinguished by
configure_parser:If
configure_parseris set,actionreceives the parsedargparse.Namespace.If
configure_parseris omitted,actionreceives the remaining argv astuple[str, ...].
- Parameters:
name -- Subcommand name (e.g.,
conda my-subcommand-name).summary -- Subcommand summary, will be shown in
conda --help.action -- Callable that will be run when the subcommand is invoked.
aliases -- Alternative name or names for the subcommand.
configure_parser -- Callable that will be run when the subcommand parser is initialized.
- action: collections.abc.Callable[[argparse.Namespace], int | None] | collections.abc.Callable[[tuple[str, ...]], int | None]#
- configure_parser: collections.abc.Callable[[argparse.ArgumentParser], None] | None = None#
- SUMMARY = 'Manage conda plugins.'#
- configure_parser(parser: argparse.ArgumentParser) None#
- execute(args: argparse.Namespace) int#
- conda_subcommands()#