aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2018-03-21 12:11:22 +0000
committersetrofim <setrofim@gmail.com>2018-03-21 13:27:31 +0000
commit2371364ce4b84da4febe24f428470e01371b1b75 (patch)
treebc034229cc8a290541fd9c0a412410e03ff82edf
parentdaa1959fd12aed370b3f217652c43ec00bf9d6d2 (diff)
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.
-rw-r--r--wa/utils/doc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wa/utils/doc.py b/wa/utils/doc.py
index a6dd5516..96e2f67a 100644
--- a/wa/utils/doc.py
+++ b/wa/utils/doc.py
@@ -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: