summaryrefslogtreecommitdiff
path: root/doc/ext
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2020-05-08 10:15:26 +0100
committerStephen Finucane <stephenfin@redhat.com>2020-05-08 10:15:26 +0100
commit8a2ed8a78ef71e36333d3a1ec4fa30a2c2d21651 (patch)
treefb34fb40ac50e3e0528978e98aedb4affd59dd0a /doc/ext
parent487c4fa92066c1cc69338aed277468b21b1c5eb9 (diff)
downloadnova-8a2ed8a78ef71e36333d3a1ec4fa30a2c2d21651.tar.gz
docs: Resolve issue with deprecated extra specs
The warning directive should look like so: .. warning:: Some text here. However, we weren't indenting the body correctly, meaning the directive appeared to have no content. Resolve this. Change-Id: Ib93cbd7c5ba64e678393554ba77f568efdb2608a Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'doc/ext')
-rw-r--r--doc/ext/extra_specs.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/ext/extra_specs.py b/doc/ext/extra_specs.py
index 6a21d76600..2963ee2756 100644
--- a/doc/ext/extra_specs.py
+++ b/doc/ext/extra_specs.py
@@ -81,11 +81,11 @@ class ExtraSpecDirective(sphinx_directives.ObjectDescription):
cached_options[sig] = self.env.docname
-def _indent(text):
+def _indent(text, count=1):
if not text:
return text
- padding = ' ' * 4
+ padding = ' ' * (4 * count)
return padding + text
@@ -133,10 +133,9 @@ def _format_validator_help(
if validator.deprecated:
yield _indent('.. warning::')
yield _indent(
- 'This extra spec has been deprecated and should not be used.'
+ 'This extra spec has been deprecated and should not be used.', 2
)
-
- yield ''
+ yield ''
class ExtraSpecGroupDirective(rst.Directive):