Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranges are not rendered in the generated docs #145

Open
renaudjester opened this issue Oct 7, 2024 · 0 comments
Open

Ranges are not rendered in the generated docs #145

renaudjester opened this issue Oct 7, 2024 · 0 comments

Comments

@renaudjester
Copy link

Hi! I am using the click.FloatRange and when using the --help the range is returned by click at the end of the help.

However with sphinx-click, it doesn't seem to appear in the documentation.

Here is a minimal example:

import click


@click.command()
@click.option("--number", type=click.FloatRange(0, 3), help="Your range")
def cli(number) -> None:
    print("Hello, world!")


if __name__ == "__main__":
    cli()

Running python small_example.py --help returns:

Usage: small_example.py [OPTIONS]

Options:
  --number FLOAT RANGE  Your range  [0<=x<=3]
  --help                Show this message and exit.

But this range cannot be seen in the documentation generated by sphinx-click.

Env:
python==3.9.18
sphinx-click==6.0.0
click==8.1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants