Bug description
Click 8.5.0 added a help parameter to click.Argument and a Positional arguments help section: pallets/click#3473. That is the feature Cloup has shipped since 0.14.0, and the two implementations now conflicts:
- A plain
click.argument(..., help=...) inside a Cloup command loses its description.
cloup.Argument drops the (DEPRECATED) label.
To Reproduce
import click
import cloup
from click.testing import CliRunner
@cloup.command()
@cloup.argument("input_path", help="Input path")
def a(**kwargs):
"""Case A: cloup.argument in a cloup command."""
@cloup.command()
@click.argument("input_path", help="Input path")
def b(**kwargs):
"""Case B: click.argument(help=...) in a cloup command."""
@cloup.command()
@cloup.argument("old_path", help="Legacy path", deprecated=True, required=False)
def c(**kwargs):
"""Case C: deprecated cloup.argument."""
@click.command()
@click.argument("old_path", help="Legacy path", deprecated=True, required=False)
def d(**kwargs):
"""Case D: deprecated click.argument."""
runner = CliRunner()
for name, cmd in [("A", a), ("B", b), ("C", c), ("D", d)]:
print("###", name)
print(runner.invoke(cmd, ["--help"], prog_name="example").output)
### A
Usage: example [OPTIONS] INPUT_PATH
Case A: cloup.argument in a cloup command.
Positional arguments:
INPUT_PATH Input path
### B
Usage: example [OPTIONS] INPUT_PATH
Case B: click.argument(help=...) in a cloup command.
Positional arguments:
INPUT_PATH
### C
Usage: example [OPTIONS] [OLD_PATH!]
Case C: deprecated cloup.argument.
Positional arguments:
[OLD_PATH!] Legacy path
### D
Usage: example [OPTIONS] [OLD_PATH!]
Case D: deprecated click.argument.
Positional arguments:
[OLD_PATH!] Legacy path (DEPRECATED)
Expected behavior
Case B renders like case A, and case C carries the (DEPRECATED) label like case D.
Bug description
Click 8.5.0 added a
helpparameter toclick.Argumentand aPositional argumentshelp section: pallets/click#3473. That is the feature Cloup has shipped since 0.14.0, and the two implementations now conflicts:click.argument(..., help=...)inside a Cloup command loses its description.cloup.Argumentdrops the(DEPRECATED)label.To Reproduce
Expected behavior
Case B renders like case A, and case C carries the
(DEPRECATED)label like case D.