From add1b727806b0fdea4e47623f3e927d7fad706a7 Mon Sep 17 00:00:00 2001 From: Duan Jiong Date: Wed, 22 Mar 2017 18:08:10 +0800 Subject: [PATCH] Fix some reST field lists in docstrings Probably the most common format for documenting arguments is reST field lists [1]. This change updates some docstrings to comply with the field lists syntax. [1] http://sphinx-doc.org/domains.html#info-field-lists Change-Id: I242b83c5713cc1faa30dcdffa2d989fb9a63b3ef Co-Authored-By: Stephen Finucane --- oslo_service/service.py | 3 +-- oslo_service/tests/base.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/oslo_service/service.py b/oslo_service/service.py index d175c7bf..848772ac 100644 --- a/oslo_service/service.py +++ b/oslo_service/service.py @@ -239,8 +239,7 @@ class Launcher(object): """Reload config files and restart service. :returns: The return value from reload_config_files or - mutate_config_files, according to the restart_method. - + mutate_config_files, according to the restart_method. """ if self.restart_method == 'reload': self.conf.reload_config_files() diff --git a/oslo_service/tests/base.py b/oslo_service/tests/base.py index e2315655..7a45b63d 100644 --- a/oslo_service/tests/base.py +++ b/oslo_service/tests/base.py @@ -39,7 +39,7 @@ class ServiceBaseTestCase(test_base.BaseTestCase): def get_new_temp_dir(self): """Create a new temporary directory. - :returns fixtures.TempDir + :returns: fixtures.TempDir """ return self.useFixture(fixtures.TempDir()) @@ -48,7 +48,7 @@ class ServiceBaseTestCase(test_base.BaseTestCase): Returns the same directory during the whole test case. - :returns fixtures.TempDir + :returns: fixtures.TempDir """ if not hasattr(self, '_temp_dir'): self._temp_dir = self.get_new_temp_dir() @@ -67,7 +67,7 @@ class ServiceBaseTestCase(test_base.BaseTestCase): :type filename: string :param root: temporary directory to create a new file in :type root: fixtures.TempDir - :returns absolute file path string + :returns: absolute file path string """ root = root or self.get_default_temp_dir() return root.join(filename)