Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PEP8 issues fixed

Fix some PEP8 issues in file doc/source/conf.py to make the code more
pretty.

Change-Id: I2efdb39c8991bf0cae180f7c4ffd459f6b418fc5
  • Loading branch information...
commit b1772999533d16853d3001ed75898253e9964adc 1 parent be20419
@oldsharp oldsharp authored
Showing with 31 additions and 21 deletions.
  1. +31 −21 doc/source/conf.py
View
52 doc/source/conf.py
@@ -3,7 +3,8 @@
# Horizon documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 27 11:38:59 2011.
#
-# This file is execfile()d with the current directory set to its containing dir.
+# This file is execfile()d with the current directory set to its
+# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
@@ -65,7 +66,8 @@ def find_autodoc_modules(module_name, sourcedir):
INDEXOUT.write("=================\n")
for modulename, path in SRCS.items():
- sys.stdout.write("Generating source documentation for %s\n" % modulename)
+ sys.stdout.write("Generating source documentation for %s\n" %
+ modulename)
INDEXOUT.write("\n%s\n" % modulename.capitalize())
INDEXOUT.write("%s\n" % ("=" * len(modulename),))
INDEXOUT.write(".. toctree::\n")
@@ -77,7 +79,8 @@ def find_autodoc_modules(module_name, sourcedir):
if not(os.path.exists(MOD_DIR)):
os.mkdir(MOD_DIR)
for module in find_autodoc_modules(modulename, path):
- if any([module.startswith(exclude) for exclude in EXCLUDED_MODULES]):
+ if any([module.startswith(exclude) for exclude \
+ in EXCLUDED_MODULES]):
print "Excluded module %s." % module
continue
mod_path = os.path.join(path, *module.split("."))
@@ -87,7 +90,8 @@ def find_autodoc_modules(module_name, sourcedir):
# Find the __init__.py module if this is a directory
if os.path.isdir(mod_path):
- source_file = ".".join((os.path.join(mod_path, "__init__"), "py",))
+ source_file = ".".join((os.path.join(mod_path, "__init__"),
+ "py",))
else:
source_file = ".".join((os.path.join(mod_path), "py"))
@@ -95,8 +99,10 @@ def find_autodoc_modules(module_name, sourcedir):
# Only generate a new file if the source has changed or we don't
# have a doc file to begin with.
if not os.access(generated_file, os.F_OK) or \
- os.stat(generated_file).st_mtime < os.stat(source_file).st_mtime:
- print "Module %s updated, generating new documentation." % module
+ os.stat(generated_file).st_mtime < \
+ os.stat(source_file).st_mtime:
+ print "Module %s updated, generating new documentation." \
+ % module
FILEOUT = open(generated_file, "w")
header = "The :mod:`%s` Module" % module
FILEOUT.write("%s\n" % ("=" * len(header),))
@@ -126,13 +132,14 @@ def find_autodoc_modules(module_name, sourcedir):
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
-# -- General configuration -----------------------------------------------------
+# -- General configuration ----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+# Add any Sphinx extension module names here, as strings.
+# They can be extensions coming with Sphinx (named 'sphinx.ext.*')
+# or your custom ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
@@ -182,7 +189,8 @@ def find_autodoc_modules(module_name, sourcedir):
# directories to ignore when looking for source files.
exclude_patterns = ['**/#*', '**~', '**/#*#']
-# The reST default role (used for this markup: `text`) to use for all documents.
+# The reST default role (used for this markup: `text`)
+# to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
@@ -206,7 +214,7 @@ def find_autodoc_modules(module_name, sourcedir):
nitpicky = False
-# -- Options for HTML output ---------------------------------------------------
+# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
@@ -291,7 +299,7 @@ def find_autodoc_modules(module_name, sourcedir):
htmlhelp_basename = 'Horizondoc'
-# -- Options for LaTeX output --------------------------------------------------
+# -- Options for LaTeX output -------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
@@ -305,10 +313,11 @@ def find_autodoc_modules(module_name, sourcedir):
}
# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
+# (source start file, target name, title, author, documentclass
+# [howto/manual]).
latex_documents = [
- ('index', 'Horizon.tex', u'Horizon Documentation',
- u'OpenStack, LLC', 'manual'),
+ ('index', 'Horizon.tex', u'Horizon Documentation',
+ u'OpenStack, LLC', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -332,7 +341,7 @@ def find_autodoc_modules(module_name, sourcedir):
#latex_domain_indices = True
-# -- Options for manual page output --------------------------------------------
+# -- Options for manual page output -------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
@@ -345,14 +354,14 @@ def find_autodoc_modules(module_name, sourcedir):
#man_show_urls = False
-# -- Options for Texinfo output ------------------------------------------------
+# -- Options for Texinfo output -----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'Horizon', u'Horizon Documentation', u'OpenStack',
- 'Horizon', 'One line description of project.', 'Miscellaneous'),
+ ('index', 'Horizon', u'Horizon Documentation', u'OpenStack',
+ 'Horizon', 'One line description of project.', 'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
@@ -365,7 +374,7 @@ def find_autodoc_modules(module_name, sourcedir):
#texinfo_show_urls = 'footnote'
-# -- Options for Epub output ---------------------------------------------------
+# -- Options for Epub output --------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = u'Horizon'
@@ -410,7 +419,8 @@ def find_autodoc_modules(module_name, sourcedir):
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
- 'django': ('http://docs.djangoproject.com/en/dev/_objects/'),
+ 'django':
+ ('http://docs.djangoproject.com/en/dev/_objects/'),
'nova': ('http://nova.openstack.org', None),
'swift': ('http://swift.openstack.org', None),
'keystone': ('http://keystone.openstack.org', None),
Please sign in to comment.
Something went wrong with that request. Please try again.