`click.Command` option `hidden=True` is ignored
See original GitHub issueclick.Command
in Click 8.1 has a option hidden=True
to make the command hidden from help message, which is similar to the behavior like hidden argument in click.Option.
While hidden=True
works well with click command option, it is ignored when commands have this option. All commands with this option are shown in help message.
This symptom is always reproducible.
Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Python click: Make some options hidden
I have several options to the command I'm defining, and I want some of them to be hidden in --help . How can...
Read more >API — Click Documentation (8.1.x)
All positional arguments are passed as parameter declarations to Option ... the return value is always None and require_save and extension are ignored....
Read more >Chapter01 Getting Started Click
Run the script with the help flag to verify the information: $ python ssh-medic.py -h Usage: ssh-medic.py [OPTIONS] COMMAND [ARGS]... Ensure ...
Read more >CommandLine.Option (picocli 4.7.0 API)
In the case of command methods (annotated with @Command ), command ... Set hidden=true if this option should not be included in the...
Read more >Docs • Svelte
In development mode (see the compiler options), a warning will be printed if ... Comments beginning with svelte-ignore disable warnings for the next...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad that can do some help. This project is awesome!
After looking into source codes in core.py from click and compare to the rich_format_help() method from rich_click.py, I believe this issue can be easily solved by adding below lines to line 477 of rich_click.py:
The above lines are copied from
MultiCommand.format_commands()
from core.py.Hope this can save some time to fix this issue and have a new fix release sooner as this is quite useful.
Thanks