aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2017-12-14 09:36:59 +0000
committersetrofim <setrofim@gmail.com>2017-12-14 09:50:26 +0000
commit9832db9fa59c14075d03b71c27758d583b422180 (patch)
treeaf82a99347228ebeb6c687891d83dbdaac4b27e5
parent346ce2fb15fefa1267af6ed3dfdd7adf82497351 (diff)
utils/doc: Rename get_rst_from_extension for consistency
-rw-r--r--wa/utils/doc.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/wa/utils/doc.py b/wa/utils/doc.py
index 05d8bc6a..a6dd5516 100644
--- a/wa/utils/doc.py
+++ b/wa/utils/doc.py
@@ -291,17 +291,16 @@ def underline(text, symbol='='):
return '{}\n{}\n\n'.format(text, symbol * len(text))
-def get_rst_from_extension(ext):
- text = underline(ext.name, '-')
- if hasattr(ext, 'description'):
- desc = strip_inlined_text(ext.description or '')
- elif ext.__doc__:
- desc = strip_inlined_text(ext.__doc__)
+def get_rst_from_plugin(plugin):
+ text = underline(plugin.name, '-')
+ if hasattr(plugin, 'description'):
+ desc = strip_inlined_text(plugin.description or '')
+ elif plugin.__doc__:
+ desc = strip_inlined_text(plugin.__doc__)
else:
desc = ''
text += desc + '\n\n'
- params_rst = get_params_rst(ext.parameters)
+ params_rst = get_params_rst(plugin.parameters)
if params_rst:
text += underline('parameters', '~') + params_rst
return text + '\n'
-