Don't display empty values as defaults
This commit is contained in:
parent
fb6ad1f08c
commit
b2fd46cd21
@ -155,7 +155,10 @@ def make_lines(config):
|
||||
if 'docstring' in values:
|
||||
right_side += truncate_docstring(values['docstring'])
|
||||
if 'default' in values:
|
||||
if values['type'] != bool:
|
||||
if values['type'] not in (bool, type(None)):
|
||||
if hasattr(values['default'], '__len__') and not len(values['default']):
|
||||
...
|
||||
else:
|
||||
right_side += f" (default: {values['default']})"
|
||||
left_side = f"--{left_side}"
|
||||
if 'short_option' in values:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user