diff options
author | Marc Bonnici <marc.bonnici@arm.com> | 2017-12-14 09:36:59 +0000 |
---|---|---|
committer | setrofim <setrofim@gmail.com> | 2017-12-14 09:50:26 +0000 |
commit | 9832db9fa59c14075d03b71c27758d583b422180 (patch) | |
tree | af82a99347228ebeb6c687891d83dbdaac4b27e5 | |
parent | 346ce2fb15fefa1267af6ed3dfdd7adf82497351 (diff) |
utils/doc: Rename get_rst_from_extension for consistency
-rw-r--r-- | wa/utils/doc.py | 15 |
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' - |