You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
where we append the content to the docstring. If previously already added it would be added twice.
Needs further testing but I don't currently have the time to dig into it.
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:
Send the message
dummy --help
. This leads to the following (correct) output on the CLI of the bot: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):
Additional context
The text was updated successfully, but these errors were encountered: