pestifer.cli.subcommand module¶
Base class for all pestifer subcommands.
- class pestifer.cli.subcommand.Subcommand(name: str, aliases: list = <factory>, log_file: str = 'pestifer_diagnostics.log', short_help: str = '', long_help: str = '', func_returns_type: type = <class 'bool'>, parser: argparse.ArgumentParser = None)[source]¶
Bases:
ABC- abstractmethod add_subparser(subparsers: ArgumentParser) ArgumentParser[source]¶
Adds the subcommand parser to the given subparsers. Subclasses declare arguments here, after a super().add_subparser() call.
- static func(args: Namespace, **kwargs)[source]¶
the function that executes the subcommand. Subclasses must implement this method.
- parser: ArgumentParser = None¶
the subparser for this subcommand