Page MenuHomeSoftware Heritage
Paste P785

Cannot make click display my multiline help
ActivePublic

Authored by tenma on Sep 25 2020, 3:55 PM.
from pprint import pformat
@swh_cli_group.group(name="scanner", context_settings=CONTEXT_SETTINGS)
@click.option(
"-C",
"--config-file",
default=None,
type=click.Path(exists=False, dir_okay=False, path_type=str),
help=f"""YAML configuration file. If absent and cannot load the default one,
default parameters are used.""",
)
@click.pass_context
def scanner(ctx, config_file: Optional[str]):
f"""Software Heritage Scanner tools.
Default config path is {DEFAULT_CONFIG_PATH}.
Default config values are {pformat(DEFAULT_CONFIG)}
"""