diplomat.utils.cli_tools.extra_cli_args

diplomat.utils.cli_tools.extra_cli_args(config_spec: Dict[str, Tuple[T, TypeCaster[T], str]], auto_cast: bool = True) Callable[[Callable], Callable][source]

A decorator for attaching additional CLI arguments to an auto-cli function…

Parameters
  • config_spec – The additional arguments to attach to the function, using config-spec format.

  • auto_cast – Boolean flag, if true don’t automatically convert extra cli args to their correct types. This means the method needs to do the conversion itself.

Returns

A decorator which attaches these arguments to the function, so they are included when turning it into a CLI function…