1
0
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:
Marc Bonnici 2018-03-21 12:11:22 +00:00 committed by setrofim
parent daa1959fd1
commit 2371364ce4

View File

@ -274,6 +274,10 @@ def get_params_rst(parameters):
param.mandatory and '(mandatory)' or ' ')
desc = strip_inlined_text(param.description or '')
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:
text += indent('\nallowed values: {}\n'.format(', '.join(map(format_literal, param.allowed_values))))
elif param.constraint: