diff options
author | Thomas Morin <thomas.morin@orange.com> | 2017-09-12 19:11:33 +0200 |
---|---|---|
committer | Thomas Morin <thomas.morin@orange.com> | 2017-09-14 09:33:26 -0600 |
commit | e2acabea0b3fa026bf1d844791cb1c9f26a8ec54 (patch) | |
tree | 2581e7bf58886bdb26a37a182406ad445b81dc6d | |
parent | 85daf7a6eb5e6e25a33d3ec0558242933741f129 (diff) | |
download | oslo-config-e2acabea0b3fa026bf1d844791cb1c9f26a8ec54.tar.gz |
Fix sphinx option generation when advanced=True
The lines produced for an option for which advanced=True
were not parsed correctly by sphinx.
Change-Id: Iec6997ee26f618ba6d5250f0597c83b4a3df02cd
Closes-Bug: 1716384
-rw-r--r-- | oslo_config/sphinxext.py | 8 | ||||
-rw-r--r-- | oslo_config/tests/test_sphinxext.py | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/oslo_config/sphinxext.py b/oslo_config/sphinxext.py index 1de23d2..580d605 100644 --- a/oslo_config/sphinxext.py +++ b/oslo_config/sphinxext.py @@ -125,7 +125,7 @@ def _format_group(app, namespace, group_name, group_obj, opt_list): try: if opt.mutable: yield _indent( - ':Mutable: This option can be changed without restarting.', + ':Mutable: This option can be changed without restarting.' ) except AttributeError as err: # NOTE(dhellmann): keystoneauth defines its own Opt class, @@ -147,11 +147,11 @@ def _format_group(app, namespace, group_name, group_obj, opt_list): (opt.dest, err)) if opt.advanced: yield _indent( - ':Advanced Option: intended for advanced users and not used',) + ':Advanced Option: Intended for advanced users and not used') yield _indent( - ':by the majority of users, and might have a significant',) + 'by the majority of users, and might have a significant', 6) yield _indent( - ':effect on stability and/or performance.',) + 'effect on stability and/or performance.', 6) yield '' try: diff --git a/oslo_config/tests/test_sphinxext.py b/oslo_config/tests/test_sphinxext.py index 2a20196..416dabe 100644 --- a/oslo_config/tests/test_sphinxext.py +++ b/oslo_config/tests/test_sphinxext.py @@ -359,9 +359,9 @@ class FormatGroupTest(base.BaseTestCase): :Type: string :Default: ``<None>`` - :Advanced Option: intended for advanced users and not used - :by the majority of users, and might have a significant - :effect on stability and/or performance. + :Advanced Option: Intended for advanced users and not used + by the majority of users, and might have a significant + effect on stability and/or performance. ''').lstrip(), results) |