click-contrib / sphinx-click

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

Display `show_default` string even when `default=None` #93

Closed ariebovenberg closed 2 years ago

ariebovenberg commented 2 years ago

Current behavior

The option

@click.option('--foo', show_default='mydefault')

will not have a default documented

Expected behavior

The text mydefault is documented as the default value for this option.

What now?

Looking at the code here, the fix seems relatively straightforward.

I'd like to submit a PR if you agree :)

stephenfin commented 2 years ago

I'd like to submit a PR if you agree :)

Go for it