Generated documentation shows a section for options with help text for each, and a section for arguments with only "Required argument".
I am using typer (probably not officially supported by sphinx-click) and I converted typer commands to click commands so that I can generate Sphinx documentation:
Make this information findable if another user searches for it (done)
Maybe you could add a block to sphinx-click documentation mentioning that arguments should be described in the command's description, as recommended by click developers.
(Alternatively, one could consider following that philosophy and removing the arguments section altogether.)
(Another possibility would be to add partial support for typer's typer.main.TyperArgument which is a subclass of click.Argument, for example with getattr(arg, "help", ""))
(This is not really a bug)
Generated documentation shows a section for options with help text for each, and a section for arguments with only "Required argument".
I am using typer (probably not officially supported by sphinx-click) and I converted typer commands to click commands so that I can generate Sphinx documentation:
Typer supports the
help
attribute for both options and arguments. To me, sphinx-click's arguments section implied that there should be descriptive text and that it was missing for some reason. It took me a while to find out thatclick.Argument
does not have thehelp
attribute by design (https://github.com/pallets/click/issues/587, https://github.com/pallets/click/issues/1049, https://github.com/pallets/click/pull/1051, https://github.com/pallets/click/issues/1217), and that click developers are so pertinaciously opinionated that they won't ever offer that flexibility (which is ok for an opinionated tool, but unfortunate for anything building on top of it).That leaves the arguments without description.
My aim:
typer.main.TyperArgument
which is a subclass ofclick.Argument
, for example withgetattr(arg, "help", "")
)