Merge "Fix PEP8 issues"
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This is a hack of the builtin todo extension, to make the todo_list more user friendly
|
# This is a hack of the builtin todo extension, to make the todo_list
|
||||||
|
# more user friendly.
|
||||||
|
|
||||||
from sphinx.ext.todo import *
|
from sphinx.ext.todo import *
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
def _(s):
|
def _(s):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
@@ -20,12 +22,11 @@ def process_todo_nodes(app, doctree, fromdocname):
|
|||||||
if not hasattr(env, 'todo_all_todos'):
|
if not hasattr(env, 'todo_all_todos'):
|
||||||
env.todo_all_todos = []
|
env.todo_all_todos = []
|
||||||
|
|
||||||
|
|
||||||
# remove the item that was added in the constructor, since I'm tired of
|
# remove the item that was added in the constructor, since I'm tired of
|
||||||
# reading through docutils for the proper way to construct an empty list
|
# reading through docutils for the proper way to construct an empty list
|
||||||
lists = []
|
lists = []
|
||||||
for i in xrange(5):
|
for i in xrange(5):
|
||||||
lists.append(nodes.bullet_list("", nodes.Text('','')))
|
lists.append(nodes.bullet_list("", nodes.Text('', '')))
|
||||||
lists[i].remove(lists[i][0])
|
lists[i].remove(lists[i][0])
|
||||||
lists[i]['classes'].append('todo_list')
|
lists[i]['classes'].append('todo_list')
|
||||||
|
|
||||||
@@ -60,7 +61,8 @@ def process_todo_nodes(app, doctree, fromdocname):
|
|||||||
|
|
||||||
todo_entry = todo_info['todo']
|
todo_entry = todo_info['todo']
|
||||||
|
|
||||||
env.resolve_references(todo_entry, todo_info['docname'], app.builder)
|
env.resolve_references(todo_entry, todo_info['docname'],
|
||||||
|
app.builder)
|
||||||
|
|
||||||
item = nodes.list_item('', para)
|
item = nodes.list_item('', para)
|
||||||
todo_entry[1]['classes'].append('details')
|
todo_entry[1]['classes'].append('details')
|
||||||
@@ -79,11 +81,11 @@ def process_todo_nodes(app, doctree, fromdocname):
|
|||||||
|
|
||||||
item.append(comment)
|
item.append(comment)
|
||||||
|
|
||||||
lists[priority-1].insert(0, item)
|
lists[priority - 1].insert(0, item)
|
||||||
|
|
||||||
|
|
||||||
node.replace_self(lists)
|
node.replace_self(lists)
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_config_value('todo_include_todos', False, False)
|
app.add_config_value('todo_include_todos', False, False)
|
||||||
|
|
||||||
@@ -98,4 +100,3 @@ def setup(app):
|
|||||||
app.connect('doctree-read', process_todos)
|
app.connect('doctree-read', process_todos)
|
||||||
app.connect('doctree-resolved', process_todo_nodes)
|
app.connect('doctree-resolved', process_todo_nodes)
|
||||||
app.connect('env-purge-doc', purge_todos)
|
app.connect('env-purge-doc', purge_todos)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
# nova documentation build configuration file, created by
|
# nova documentation build configuration file, created by
|
||||||
# sphinx-quickstart on Sat May 1 15:17:47 2010.
|
# sphinx-quickstart on Sat May 1 15:17:47 2010.
|
||||||
#
|
#
|
||||||
# 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
|
# Note that not all possible configuration values are present in this
|
||||||
# autogenerated file.
|
# autogenerated file.
|
||||||
@@ -11,7 +12,8 @@
|
|||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
import sys, os
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
@@ -20,23 +22,30 @@ sys.path.insert(0, os.path.abspath('../../'))
|
|||||||
sys.path.insert(0, os.path.abspath('../'))
|
sys.path.insert(0, os.path.abspath('../'))
|
||||||
sys.path.insert(0, os.path.abspath('./'))
|
sys.path.insert(0, os.path.abspath('./'))
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
|
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'ext.nova_todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig','sphinx.ext.graphviz']
|
extensions = ['sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.intersphinx',
|
||||||
|
'ext.nova_todo',
|
||||||
|
'sphinx.ext.coverage',
|
||||||
|
'sphinx.ext.pngmath',
|
||||||
|
'sphinx.ext.ifconfig',
|
||||||
|
'sphinx.ext.graphviz']
|
||||||
|
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
# Changing the path so that the Hudson build output contains GA code and the source
|
# Changing the path so that the Hudson build output contains GA code
|
||||||
# docs do not contain the code so local, offline sphinx builds are "clean."
|
# and the source docs do not contain the code so local, offline sphinx builds
|
||||||
|
# are "clean."
|
||||||
templates_path = []
|
templates_path = []
|
||||||
if os.getenv('HUDSON_PUBLISH_DOCS'):
|
if os.getenv('HUDSON_PUBLISH_DOCS'):
|
||||||
templates_path = ['_ga', '_templates']
|
templates_path = ['_ga', '_templates']
|
||||||
else:
|
else:
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
# The suffix of source filenames.
|
# The suffix of source filenames.
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
@@ -83,7 +92,8 @@ unused_docs = [
|
|||||||
# for source files.
|
# for source files.
|
||||||
exclude_trees = []
|
exclude_trees = []
|
||||||
|
|
||||||
# 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
|
#default_role = None
|
||||||
|
|
||||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
@@ -103,7 +113,7 @@ pygments_style = 'sphinx'
|
|||||||
# A list of ignored prefixes for module index sorting.
|
# A list of ignored prefixes for module index sorting.
|
||||||
modindex_common_prefix = ['nova.']
|
modindex_common_prefix = ['nova.']
|
||||||
|
|
||||||
# -- Options for man page output -----------------------------------------------
|
# -- Options for man page output ----------------------------------------------
|
||||||
|
|
||||||
# Grouping the document tree for man pages.
|
# Grouping the document tree for man pages.
|
||||||
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
|
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
|
||||||
@@ -113,7 +123,7 @@ man_pages = [
|
|||||||
[u'OpenStack'], 1)
|
[u'OpenStack'], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
# -- Options for HTML output ---------------------------------------------------
|
# -- Options for HTML output --------------------------------------------------
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||||
@@ -190,7 +200,7 @@ html_last_updated_fmt = os.popen(git_cmd).read()
|
|||||||
htmlhelp_basename = 'novadoc'
|
htmlhelp_basename = 'novadoc'
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output --------------------------------------------------
|
# -- Options for LaTeX output -------------------------------------------------
|
||||||
|
|
||||||
# The paper size ('letter' or 'a4').
|
# The paper size ('letter' or 'a4').
|
||||||
#latex_paper_size = 'letter'
|
#latex_paper_size = 'letter'
|
||||||
@@ -199,11 +209,10 @@ htmlhelp_basename = 'novadoc'
|
|||||||
#latex_font_size = '10pt'
|
#latex_font_size = '10pt'
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# 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
|
||||||
latex_documents = [
|
# [howto/manual]).
|
||||||
('index', 'Nova.tex', u'Nova Documentation',
|
latex_documents = [('index', 'Nova.tex', u'Nova Documentation',
|
||||||
u'Anso Labs, LLC', 'manual'),
|
u'Anso Labs, LLC', 'manual'), ]
|
||||||
]
|
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
# the title page.
|
# the title page.
|
||||||
@@ -226,4 +235,3 @@ latex_documents = [
|
|||||||
# Example configuration for intersphinx: refer to the Python standard library.
|
# Example configuration for intersphinx: refer to the Python standard library.
|
||||||
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
|
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
|
||||||
'swift': ('http://swift.openstack.org', None)}
|
'swift': ('http://swift.openstack.org', None)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user