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 doc output for the click directive includes the args I add, but not the --help flag.
For instance, with this example:
@click.command()
@click.option(
"--secs", type=int, required=False, default=1, help="Number of seconds to wait."
)
@typechecked
def main(secs: int = 1) -> None:
"""Wait n seconds."""
example.wait_a_second(secs=secs)
I include the click directive in a doc:
.. click:: reference_package.cli.example:main
:prog: example
:nested: full
And, I only get the --secs arg in my doc.
But, of course, --help is a legit flag, and it shows up when using itself:
$ example --help
Usage: example [OPTIONS]
Wait n seconds.
Options:
--secs INTEGER Number of seconds to wait.
--help Show this message and exit.
My users are inexperienced and may not always know/remember that --help is a thing. I can manually add an example of using --help to every doc, but is there a way to include --help in the doc output for the click directive?
Versions:
Python: 3.12
click: 8.1.8
sphinx-click 6.0.0
The text was updated successfully, but these errors were encountered:
The doc output for the click directive includes the args I add, but not the
--help
flag.For instance, with this example:
I include the
click
directive in a doc:And, I only get the
--secs
arg in my doc.But, of course,
--help
is a legit flag, and it shows up when using itself:My users are inexperienced and may not always know/remember that
--help
is a thing. I can manually add an example of using--help
to every doc, but is there a way to include--help
in the doc output for theclick
directive?Versions:
The text was updated successfully, but these errors were encountered: