addArgumentHelp

lsst.daf.butler.cli.utils.addArgumentHelp(doc: str | None[str, None], helpText: str) → str

Add a Click argument’s help message to a function’s documentation.

This is needed because click presents arguments in the order the argument decorators are applied to a function, top down. But, the evaluation of the decorators happens bottom up, so if arguments just append their help to the function’s docstring, the argument descriptions appear in reverse order from the order they are applied in.

Parameters:
doc : str

The function’s docstring.

helpText : str

The argument’s help string to be inserted into the function’s docstring.

Returns:
doc : str

Updated function documentation.