All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # -*- coding: utf-8 -*-
3 # Configuration file for the Sphinx documentation builder.
5 # This file does only contain a selection of the most common options. For a
6 # full list see the documentation:
7 # http://www.sphinx-doc.org/en/stable/config
9 # -- Path setup --------------------------------------------------------------
11 # If extensions (or modules to document with autodoc) are in another directory,
12 # add these directories to sys.path here. If the directory is relative to the
13 # documentation root, use os.path.abspath to make it absolute, like shown here.
16 from pathlib import Path
19 from recommonmark.parser import CommonMarkParser
22 CURRENT_DIR = Path(__file__).parent
26 black_py = CURRENT_DIR / '..' / 'black.py'
27 _version_re = re.compile(r'__version__\s+=\s+(?P<version>.*)')
28 with open(str(black_py), 'r', encoding='utf8') as f:
29 version = _version_re.search(f.read()).group('version')
30 return str(ast.literal_eval(version))
33 # -- Project information -----------------------------------------------------
36 copyright = '2018, Łukasz Langa and contributors to Black'
37 author = 'Łukasz Langa and contributors to Black'
39 # Autopopulate version
40 # The full version, including alpha/beta/rc tags.
41 release = get_version()
42 # The short X.Y version.
45 version = version.split(sp)[0]
47 # -- General configuration ---------------------------------------------------
49 # If your documentation needs a minimal Sphinx version, state it here.
51 # needs_sphinx = '1.0'
53 # Add any Sphinx extension module names here, as strings. They can be
54 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
58 'sphinx.ext.intersphinx',
61 # Add any paths that contain templates here, relative to this directory.
62 templates_path = ['_templates']
65 '.md': CommonMarkParser,
68 # The suffix(es) of source filenames.
69 # You can specify multiple suffix as a list of string:
70 source_suffix = ['.rst', '.md']
72 # The master toctree document.
75 # The language for content autogenerated by Sphinx. Refer to documentation
76 # for a list of supported languages.
78 # This is also used if you do content translation via gettext catalogs.
79 # Usually you set "language" from the command line for these cases.
82 # List of patterns, relative to source directory, that match files and
83 # directories to ignore when looking for source files.
84 # This pattern also affects html_static_path and html_extra_path .
85 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
87 # The name of the Pygments (syntax highlighting) style to use.
88 pygments_style = 'sphinx'
91 # -- Options for HTML output -------------------------------------------------
93 # The theme to use for HTML and HTML Help pages. See the documentation for
94 # a list of builtin themes.
96 html_theme = 'alabaster'
108 html_theme_options = {
109 'show_related': True,
110 'description': '“Any color you like.”',
111 'github_button': True,
112 'github_user': 'ambv',
113 'github_repo': 'black',
114 'github_type': 'star',
115 'show_powered_by': True,
116 'fixed_sidebar': True,
121 # Add any paths that contain custom static files (such as style sheets) here,
122 # relative to this directory. They are copied after the builtin static files,
123 # so a file named "default.css" will overwrite the builtin "default.css".
124 html_static_path = ['_static']
126 # Custom sidebar templates, must be a dictionary that maps document names
129 # The default sidebars (for documents that don't match any pattern) are
130 # defined by theme itself. Builtin themes are using these templates by
131 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
132 # 'searchbox.html']``.
137 # -- Options for HTMLHelp output ---------------------------------------------
139 # Output file base name for HTML help builder.
140 htmlhelp_basename = 'blackdoc'
143 # -- Options for LaTeX output ------------------------------------------------
146 # The paper size ('letterpaper' or 'a4paper').
148 # 'papersize': 'letterpaper',
150 # The font size ('10pt', '11pt' or '12pt').
152 # 'pointsize': '10pt',
154 # Additional stuff for the LaTeX preamble.
158 # Latex figure (float) alignment
160 # 'figure_align': 'htbp',
163 # Grouping the document tree into LaTeX files. List of tuples
164 # (source start file, target name, title,
165 # author, documentclass [howto, manual, or own class]).
167 (master_doc, 'black.tex', 'Documentation for Black',
168 'Łukasz Langa and contributors to Black', 'manual'),
172 # -- Options for manual page output ------------------------------------------
174 # One entry per manual page. List of tuples
175 # (source start file, name, description, authors, manual section).
177 (master_doc, 'black', 'Documentation for Black',
182 # -- Options for Texinfo output ----------------------------------------------
184 # Grouping the document tree into Texinfo files. List of tuples
185 # (source start file, target name, title, author,
186 # dir menu entry, description, category)
187 texinfo_documents = [
188 (master_doc, 'Black', 'Documentation for Black',
189 author, 'Black', 'The uncompromising Python code formatter',
194 # -- Options for Epub output -------------------------------------------------
196 # Bibliographic Dublin Core info.
199 epub_publisher = author
200 epub_copyright = copyright
202 # The unique identifier of the text. This can be a ISBN number
203 # or the project homepage.
205 # epub_identifier = ''
207 # A unique identification for the text.
211 # A list of files that should not be packed into the epub file.
212 epub_exclude_files = ['search.html']
215 # -- Extension configuration -------------------------------------------------
217 # -- Options for intersphinx extension ---------------------------------------
219 # Example configuration for intersphinx: refer to the Python standard library.
220 intersphinx_mapping = {'https://docs.python.org/3/': None}