diff --git a/lisa/conf.py b/lisa/conf.py index e596f1c2730584b9496f28cd0c439855071fec39..4564e615d03928ff2e856217ca33f643249d387a 100644 --- a/lisa/conf.py +++ b/lisa/conf.py @@ -1148,7 +1148,7 @@ class ConfigurableMeta(abc.ABCMeta): # Update the docstring by using the configuration help docstring = inspect.getdoc(new_cls) if docstring: - new_cls.__doc__ = textwrap.dedent(docstring).format( + new_cls.__doc__ = docstring.format( configurable_params=new_cls._get_rst_param_doc() ) diff --git a/lisa/tests/base.py b/lisa/tests/base.py index c75cf469760a073ae4878bb4d5a60e92e8142a00..86a8bb9a569407a973a39bb99a3a98f603a9d341 100644 --- a/lisa/tests/base.py +++ b/lisa/tests/base.py @@ -625,7 +625,7 @@ class RTATestBundle(TestBundle, metaclass=RTATestBundleMeta): ) # Make it obvious in the doc where the extra parameters come from - merged_doc = textwrap.dedent(cls.test_noisy_tasks.__doc__).splitlines() + merged_doc = inspect.getdoc(cls.test_noisy_tasks.__doc__).splitlines() # Replace the one-liner func description merged_doc[1] = textwrap.dedent( """ @@ -637,8 +637,8 @@ class RTATestBundle(TestBundle, metaclass=RTATestBundleMeta): """.format(cls.__module__, cls.__name__, cls.check_noisy_tasks.__name__) ) - #pylint: disable=no-member - wrapper.__doc__ = textwrap.dedent(wrapper.__doc__) + "\n".join(merged_doc) + wrapper_doc = inspect.getdoc(wrapper) or '' + wrapper.__doc__ = wrapper_doc + "\n".join(merged_doc) return wrapper return decorator