Open
Description
Describe the bug
The output of help for commands created with click contains duplicate content and is sometimes oddly formatted.
How To Reproduce
Create a bot with the following listener:
@listen_to("dummy")
@click.command(
context_settings=dict(
allow_extra_args=True,
),
)
@click.option(
"-o",
"--opt",
type=str,
help="Help text for option",
)
@click.argument("args", nargs=-1)
def dummy(
self,
message,
opt: str,
args: List[str],
) -> None:
"""A description of the command
More information here
"""
return
Send the message dummy --help
. This leads to the following (correct) output on the CLI of the bot:
Usage: MyPlugin [OPTIONS] [ARGS]...
A description of the command
More information here
Options:
-o, --opt TEXT Help text for option
--help Show this message and exit.
However, in Mattermost the following response is sent:
Expected behavior
The help text defined in the docstring should only be shown once and formatted consistently (ie. not mixing regular and verbatim text)
Operating Environment (please complete the following information):
- mmpy_bot Version: 2.2.1
- mattermostdriver/mattermostautodriver Version: 7.3.2/1.2.0
- Mattermost Server Version: 7.4
- Python Version: 3.9
- OS: Linux
Additional context