diff --git a/src/clapper/click.py b/src/clapper/click.py index d32091e43ac65924e9252eab2368a09b5ea2efc2..913779696518969d590480b7fef61d640a178721 100644 --- a/src/clapper/click.py +++ b/src/clapper/click.py @@ -107,13 +107,14 @@ def verbosity_option( default=dflt, show_default=True, help=dedent( - f"""Increase the verbosity level from 0 (only error and - critical) messages will be displayed, to 1 (like 0, but adds - warnings), 2 (like 1, but adds info messages), and 3 (like 2, - but also adds debugging messages) by adding the --{name} option - as often as desired (e.g. '-vvv' for debug). + f"""\ + Increase the verbosity level from 0 (only error and critical) + messages will be displayed, to 1 (like 0, but adds warnings), 2 + (like 1, but adds info messages), and 3 (like 2, but also adds + debugging messages) by adding the --{name} option as often as + desired (e.g. '-vvv' for debug). """ - ), + ).replace("\n", " "), callback=callback, **kwargs, )(f) @@ -180,12 +181,18 @@ class ConfigCommand(click.Command): the command-line (see below) will override the values of configuration files. You can run this command with ``<COMMAND> -H example_config.py`` to create a template config file. + """ + ) + entry_points = dedent( + f""" Available configs entry points are: {entry_points_str} + """ ) + self.extra_help = "\n\n".join((self.extra_help, entry_points)) help = "\n\n".join(((help or "").rstrip(), self.extra_help)) super().__init__(name, *args, help=help, **kwargs) @@ -388,19 +395,16 @@ class ResourceOption(click.Option): param_decls, kwargs.get("expose_value") ) help = help or "" - help = " ".join( - ( - help, - dedent( - f"""Can be a `{entry_point_group}' entry point, a module - name, or a path to a Python file which contains a - variable named '{name}'. Available entry points are: - - {entry_points_str} - """ - ), - ) + self.extra_help = dedent( + f"""\ + Can be a `{entry_point_group}' entry point, a module name, or a + path to a Python file which contains a variable named '{name}'. + Available entry points are: + + {entry_points_str} + """ ) + help = " ".join((help, self.extra_help)) super().__init__( param_decls=param_decls,