-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Fire (v0.4.0, master) does not seem to show default values for keyword-only arguments. Consider the following example:
#!/usr/bin/env python3
import fire
def foo(*, bar=True):
print(bar)
if __name__ == '__main__':
fire.Fire(foo)Save it as foo.py and run python3 foo.py --help.
Expected Output:
INFO: Showing help with the command 'foo.py -- --help'.
NAME
foo.py
SYNOPSIS
foo.py <flags>
FLAGS
--bar=BAR
Default: TrueActual Output:
INFO: Showing help with the command 'foo.py -- --help'.
NAME
foo.py
SYNOPSIS
foo.py <flags>
FLAGS
--bar=BARLooks like a one line change could fix this: change the return statement here
Line 527 in 37c4305
| return '' |
return repr(spec.kwonlydefaults.get(flag, ''))