PEP8tify conf.py generated by sphinx-quickstart

This commit is contained in:
Takafumi Arakaki 2013-04-20 21:14:09 +02:00
parent 4ce1cbc010
commit 1006011528

View File

@ -43,7 +43,8 @@ QUICKSTART_CONF += u'''\
# %(project)s documentation build configuration file, created by # %(project)s documentation build configuration file, created by
# sphinx-quickstart on %(now)s. # sphinx-quickstart on %(now)s.
# #
# 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.
@ -51,20 +52,22 @@ QUICKSTART_CONF += u'''\
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.')) #sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ----------------------------------------------------- # -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0' #needs_sphinx = '1.0'
# 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 = [%(extensions)s] extensions = [%(extensions)s]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
@ -106,7 +109,8 @@ release = '%(release_str)s'
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = [%(exclude_patterns)s] exclude_patterns = [%(exclude_patterns)s]
# 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.
@ -130,7 +134,7 @@ pygments_style = 'sphinx'
#keep_warnings = False #keep_warnings = False
# -- Options for HTML output --------------------------------------------------- # -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
@ -210,7 +214,7 @@ html_static_path = ['%(dot)sstatic']
htmlhelp_basename = '%(project_fn)sdoc' htmlhelp_basename = '%(project_fn)sdoc'
# -- Options for LaTeX output -------------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
latex_elements = { latex_elements = {
# The paper size ('letterpaper' or 'a4paper'). # The paper size ('letterpaper' or 'a4paper').
@ -224,7 +228,8 @@ latex_elements = {
} }
# 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 [howto/manual]).
latex_documents = [ latex_documents = [
('%(master_str)s', '%(project_fn)s.tex', u'%(project_doc_texescaped_str)s', ('%(master_str)s', '%(project_fn)s.tex', u'%(project_doc_texescaped_str)s',
u'%(author_texescaped_str)s', 'manual'), u'%(author_texescaped_str)s', 'manual'),
@ -251,7 +256,7 @@ latex_documents = [
#latex_domain_indices = True #latex_domain_indices = True
# -- Options for manual page output -------------------------------------------- # -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
@ -264,7 +269,7 @@ man_pages = [
#man_show_urls = False #man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------ # -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples # Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author, # (source start file, target name, title, author,
@ -290,7 +295,7 @@ texinfo_documents = [
EPUB_CONFIG = u''' EPUB_CONFIG = u'''
# -- Options for Epub output --------------------------------------------------- # -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info. # Bibliographic Dublin Core info.
epub_title = u'%(project_str)s' epub_title = u'%(project_str)s'
@ -1058,6 +1063,7 @@ def generate(d, overwrite=True, silent=False):
"""Generate project based on values in *d*.""" """Generate project based on values in *d*."""
texescape.init() texescape.init()
indent = ' ' * 4
if 'mastertoctree' not in d: if 'mastertoctree' not in d:
d['mastertoctree'] = '' d['mastertoctree'] = ''
@ -1068,11 +1074,15 @@ def generate(d, overwrite=True, silent=False):
d['project_manpage'] = d['project_fn'].lower() d['project_manpage'] = d['project_fn'].lower()
d['now'] = time.asctime() d['now'] = time.asctime()
d['project_underline'] = len(d['project']) * '=' d['project_underline'] = len(d['project']) * '='
d['extensions'] = ', '.join( extensions = (',\n' + indent).join(
repr('sphinx.ext.' + name) repr('sphinx.ext.' + name)
for name in ('autodoc', 'doctest', 'intersphinx', 'todo', 'coverage', for name in ('autodoc', 'doctest', 'intersphinx', 'todo', 'coverage',
'pngmath', 'mathjax', 'ifconfig', 'viewcode') 'pngmath', 'mathjax', 'ifconfig', 'viewcode')
if d.get('ext_' + name)) if d.get('ext_' + name))
if extensions:
d['extensions'] = '\n' + indent + extensions + ',\n'
else:
d['extensions'] = extensions
d['copyright'] = time.strftime('%Y') + ', ' + d['author'] d['copyright'] = time.strftime('%Y') + ', ' + d['author']
d['author_texescaped'] = unicode(d['author']).\ d['author_texescaped'] = unicode(d['author']).\
translate(texescape.tex_escape_map) translate(texescape.tex_escape_map)