1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 10:51:13 +01:00

utils/doc: Rename get_rst_from_extension for consistency

This commit is contained in:
Marc Bonnici 2017-12-14 09:36:59 +00:00 committed by setrofim
parent 346ce2fb15
commit 9832db9fa5

View File

@ -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'