`rich-click` doesn't support `click.Choice`
See original GitHub issueIโm writing a command which has a --composition
parameter that uses click.Choice
:
@click.option(
"--composition",
type=click.Choice(["auto", "metagenome"], case_sensitive=False),
)
In vanilla click
, the possible choices appear as expected:
Options:
--version Show the version and exit.
--composition [auto|metagenome]
-v, --verbose / -q, --quiet Display the execution log. [default:
verbose]
-h, --help Show this message and exit.
rich-click
omits the options:
โญโ Basic options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --composition โ
โ --verbose/--quiet -v/-q Display the execution log. [default: verbose] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Other โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --help -h Show this message and exit. โ
โ --version Show the version and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
ewels/rich-click: Format click help output nicely with rich.
The intention of rich-click is to provide attractive help output from click, formatted with rich, with minimal customisation required. Features. Rich commandย ...
Read more >Options โ Click Documentation (8.1.x)
The most basic option is a value option. These options accept one argument which is a value. If no type is provided, the...
Read more >Option parsing issue with python click
The CLI can be specified with a rich grammar which supports complex CLI options and combinations. The CLI can be run as an...
Read more >rich-click
The intention of rich-click is to provide attractive help output from click, formatted with rich, with minimal customisation required. Screenshots. Native click ......
Read more >Building Delightful Command-Line Interfaces with Click
Click makes it easy to create rich and informative help documentation. Click automatically adds a --help option to all commands (which can beย ......
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
To be honest, Iโm 100% sure this was not a problem with the documentation. I had read all the customization options before and simply forgot about them. But maybe you could add a TOC in the beginning of the README? This way users wouldnโt need to scroll all the way down to see that there are tons of customization options available.
Yup, not a bad idea. Iโve gone off manual ToCs a bit since GitHub added their markdown dropdown header menu, as theyโre a pain to keep up to date. But I agree that it would be nice to aid visibility here.
Looking at the readme I should probably add more mention of Typer to the intro as wellโฆ