Fix displaying help of keyword options.
This commit is contained in:
parent
2e8800504c
commit
12d0340af8
|
@ -287,13 +287,12 @@ class Baker(object):
|
||||||
file.write(format_paras(paras[1:], 76, indent=4))
|
file.write(format_paras(paras[1:], 76, indent=4))
|
||||||
file.write("\n")
|
file.write("\n")
|
||||||
|
|
||||||
|
# Get a sorted list of keyword argument names
|
||||||
|
keynames = sorted([key for key, value in cmd.keywords.items() if value is not None])
|
||||||
# Print documentation for keyword options
|
# Print documentation for keyword options
|
||||||
if cmd.keywords:
|
if keynames:
|
||||||
file.write("Options:\n\n")
|
file.write("Options:\n\n")
|
||||||
|
|
||||||
# Get a sorted list of keyword argument names
|
|
||||||
keynames = sorted(cmd.keywords.keys())
|
|
||||||
|
|
||||||
# Make formatted headings, e.g. " -k --keyword ", and put them in
|
# Make formatted headings, e.g. " -k --keyword ", and put them in
|
||||||
# a list like [(name, heading), ...]
|
# a list like [(name, heading), ...]
|
||||||
heads = []
|
heads = []
|
||||||
|
|
Loading…
Reference in New Issue