mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
PEP8tify conf.py generated by sphinx-quickstart
This commit is contained in:
parent
4ce1cbc010
commit
1006011528
@ -43,7 +43,8 @@ QUICKSTART_CONF += u'''\
|
||||
# %(project)s documentation build configuration file, created by
|
||||
# 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
|
||||
# autogenerated file.
|
||||
@ -51,20 +52,22 @@ QUICKSTART_CONF += u'''\
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
import sys
|
||||
import os
|
||||
|
||||
# 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
|
||||
# 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 = [%(extensions)s]
|
||||
|
||||
# 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.
|
||||
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
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
@ -130,7 +134,7 @@ pygments_style = 'sphinx'
|
||||
#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
|
||||
# a list of builtin themes.
|
||||
@ -210,7 +214,7 @@ html_static_path = ['%(dot)sstatic']
|
||||
htmlhelp_basename = '%(project_fn)sdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
@ -224,7 +228,8 @@ latex_elements = {
|
||||
}
|
||||
|
||||
# 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 = [
|
||||
('%(master_str)s', '%(project_fn)s.tex', u'%(project_doc_texescaped_str)s',
|
||||
u'%(author_texescaped_str)s', 'manual'),
|
||||
@ -251,7 +256,7 @@ latex_documents = [
|
||||
#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).
|
||||
@ -264,7 +269,7 @@ man_pages = [
|
||||
#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,
|
||||
@ -290,7 +295,7 @@ texinfo_documents = [
|
||||
|
||||
EPUB_CONFIG = u'''
|
||||
|
||||
# -- Options for Epub output ---------------------------------------------------
|
||||
# -- Options for Epub output ----------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = u'%(project_str)s'
|
||||
@ -1058,6 +1063,7 @@ def generate(d, overwrite=True, silent=False):
|
||||
"""Generate project based on values in *d*."""
|
||||
|
||||
texescape.init()
|
||||
indent = ' ' * 4
|
||||
|
||||
if 'mastertoctree' not in d:
|
||||
d['mastertoctree'] = ''
|
||||
@ -1068,11 +1074,15 @@ def generate(d, overwrite=True, silent=False):
|
||||
d['project_manpage'] = d['project_fn'].lower()
|
||||
d['now'] = time.asctime()
|
||||
d['project_underline'] = len(d['project']) * '='
|
||||
d['extensions'] = ', '.join(
|
||||
extensions = (',\n' + indent).join(
|
||||
repr('sphinx.ext.' + name)
|
||||
for name in ('autodoc', 'doctest', 'intersphinx', 'todo', 'coverage',
|
||||
'pngmath', 'mathjax', 'ifconfig', 'viewcode')
|
||||
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['author_texescaped'] = unicode(d['author']).\
|
||||
translate(texescape.tex_escape_map)
|
||||
|
Loading…
Reference in New Issue
Block a user