diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2017-07-12 10:40:37 +0100 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2017-07-12 14:20:25 +0100 |
commit | 62ccbe1c3ffd1ef2d157ff4050447b1d6a6d91ca (patch) | |
tree | d2475b7ceadef6c03b6b50e7099d093e914b8645 /doc/ext | |
parent | 6671ddc832a770b9990bc60b30c00d17d0a64f8e (diff) | |
download | nova-62ccbe1c3ffd1ef2d157ff4050447b1d6a6d91ca.tar.gz |
doc: Enable pep8 on doc generation code
As pep8 does not run on doc generation python code so we have some
style violations there. As it not too hard to fix the problems and
therefore enable pep8 on these files this patch proposes such a
change.
Change-Id: I26104ea66fc4f3e67f8227025f43202e483beb25
Diffstat (limited to 'doc/ext')
-rw-r--r-- | doc/ext/support_matrix.py | 11 | ||||
-rw-r--r-- | doc/ext/versioned_notifications.py | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/doc/ext/support_matrix.py b/doc/ext/support_matrix.py index f99ff78cd5..96e0b379e9 100644 --- a/doc/ext/support_matrix.py +++ b/doc/ext/support_matrix.py @@ -25,7 +25,6 @@ It is used via a single directive in the .rst file import re import sys -import six from six.moves import configparser from docutils import nodes @@ -59,7 +58,9 @@ class SupportMatrixFeature(object): STATUS_CONDITION, STATUS_OPTIONAL] def __init__(self, key, title, status=STATUS_OPTIONAL, - group=None, notes=None, cli=[]): + group=None, notes=None, cli=None): + if not cli: + cli = [] # A unique key (eg 'foo.bar.wizz') to identify the feature self.key = key # A human friendly short title for the feature @@ -474,10 +475,10 @@ class SupportMatrixDirective(rst.Directive): notes.append(item) def _create_cli_paragraph(self, feature): - ''' Create a paragraph which represents the CLI commands of the feature + """Create a paragraph which represents the CLI commands of the feature The paragraph will have a bullet list of CLI commands. - ''' + """ para = nodes.paragraph() para.append(nodes.strong(text="CLI commands:")) commands = nodes.bullet_list() @@ -489,7 +490,7 @@ class SupportMatrixDirective(rst.Directive): return para def _create_notes_paragraph(self, notes): - """ Constructs a paragraph which represents the implementation notes + """Constructs a paragraph which represents the implementation notes The paragraph consists of text and clickable URL nodes if links were given in the notes. diff --git a/doc/ext/versioned_notifications.py b/doc/ext/versioned_notifications.py index da0b2f82bf..64b3babba9 100644 --- a/doc/ext/versioned_notifications.py +++ b/doc/ext/versioned_notifications.py @@ -22,8 +22,8 @@ It is used via a single directive in the .rst file from docutils import nodes import importlib -from sphinx.util.compat import Directive import pkgutil +from sphinx.util.compat import Directive import nova.notifications.objects from nova.notifications.objects import base as notification |