fora.main

Provides the top-level logic of fora such as the CLI interface and main script dispatching.

class main.ArgumentParserError

Error class for argument parsing errors.

class main.ThrowingArgumentParser

An argument parser that throws when invalid argument types are passed.

def ThrowingArgumentParser.error()

def ThrowingArgumentParser.error(self, message: str) -> NoReturn:

Raises an exception on error.

class main.ActionImmediateFunction

An action that calls a function immediately when the argument is encountered.

Functions

def main.main_run()

def main.main_run(args: argparse.Namespace) -> None:

Main method used to run a script on an inventory.

Parameters

  • args: The parsed arguments

def main.show_inventory()

def main.show_inventory(inventory: str) -> None:

Display a summary of the given inventory.

Parameters

  • inventory: The inventory argument

def main.main()

def main.main(argv: Optional[list[str]] = None) -> None:

The main program entry point. This will parse arguments, load inventory and task definitions and run the given user script. Defaults to sys.argv[1:] if argv is None.

Last updated