click-contrib / sphinx-click

A Sphinx plugin to automatically document click-based applications
MIT License
212 stars 57 forks source link

handle numeric choices #75

Closed tmasek closed 3 years ago

tmasek commented 3 years ago

https://github.com/click-contrib/sphinx-click/blob/54b80c873ce543019097a53f92486d1f3d70d097/sphinx_click/ext.py#L91

The "join()" call in ^^ this ^^ line should probably say ' | '.join(str(_) for _ in opt.type.choices) instead.

Not sure, there may be other related issues, but this is the one that got me..

tmasek commented 3 years ago

thanks!

domdfcoding commented 3 years ago

The documentation for click.Choice says "All of these values have to be strings."

Click itself errors when passing integers (see https://github.com/pallets/click/issues/784)