mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
utils/doc: Adds support for showing aliases when formatting parameters
Now displays all available local and global aliases when generating the rst for a parameter.
This commit is contained in:
parent
daa1959fd1
commit
2371364ce4
@ -274,6 +274,10 @@ def get_params_rst(parameters):
|
|||||||
param.mandatory and '(mandatory)' or ' ')
|
param.mandatory and '(mandatory)' or ' ')
|
||||||
desc = strip_inlined_text(param.description or '')
|
desc = strip_inlined_text(param.description or '')
|
||||||
text += indent('{}\n'.format(desc))
|
text += indent('{}\n'.format(desc))
|
||||||
|
if param.aliases:
|
||||||
|
text += indent('\naliases: {}\n'.format(', '.join(map(format_literal, param.aliases))))
|
||||||
|
if param.global_alias:
|
||||||
|
text += indent('\nglobal alias: {}\n'.format(format_literal(param.global_alias)))
|
||||||
if param.allowed_values:
|
if param.allowed_values:
|
||||||
text += indent('\nallowed values: {}\n'.format(', '.join(map(format_literal, param.allowed_values))))
|
text += indent('\nallowed values: {}\n'.format(', '.join(map(format_literal, param.allowed_values))))
|
||||||
elif param.constraint:
|
elif param.constraint:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user