Merge "doc: Enable pep8 on doc generation code"
This commit is contained in:
commit
6205a3f8c4
@ -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.
|
||||
|
@ -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
|
||||
|
@ -1,12 +1,24 @@
|
||||
# nova documentation build configuration file
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# nova documentation build configuration file
|
||||
#
|
||||
# Refer to the Sphinx documentation for advice on configuring this file:
|
||||
#
|
||||
# http://www.sphinx-doc.org/en/stable/config.html
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import warnings
|
||||
|
||||
from nova.version import version_info
|
||||
|
2
tox.ini
2
tox.ini
@ -177,7 +177,7 @@ commands = bash -c tools/releasenotes_tox.sh
|
||||
|
||||
enable-extensions = H106,H203,H904
|
||||
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
|
||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools/xenserver*,releasenotes
|
||||
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools/xenserver*,releasenotes
|
||||
# To get a list of functions that are more complex than 25, set max-complexity
|
||||
# to 25 and run 'tox -epep8'.
|
||||
# 34 is currently the most complex thing we have
|
||||
|
Loading…
x
Reference in New Issue
Block a user