|
2 | 2 |
|
3 | 3 | import os
|
4 | 4 | import sys
|
5 |
| -sys.path.insert(0, os.path.abspath('..')) |
| 5 | + |
| 6 | +sys.path.insert(0, os.path.abspath("..")) |
6 | 7 |
|
7 | 8 | # -- General configuration ------------------------------------------------
|
8 | 9 |
|
9 | 10 | # Add any Sphinx extension module names here, as strings. They can be
|
10 | 11 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
11 | 12 | # ones.
|
12 | 13 | extensions = [
|
13 |
| - 'sphinx.ext.autodoc', |
14 |
| - 'sphinx.ext.intersphinx', |
15 |
| - 'sphinx.ext.viewcode', |
| 14 | + "sphinx.ext.autodoc", |
| 15 | + "sphinx.ext.intersphinx", |
| 16 | + "sphinx.ext.viewcode", |
16 | 17 | ]
|
17 | 18 |
|
18 | 19 | autodoc_mock_imports = ["pulseio"]
|
19 | 20 |
|
20 |
| -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} |
| 21 | +intersphinx_mapping = { |
| 22 | + "python": ("https://docs.python.org/3.4", None), |
| 23 | + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), |
| 24 | +} |
21 | 25 |
|
22 | 26 | # Add any paths that contain templates here, relative to this directory.
|
23 |
| -templates_path = ['_templates'] |
| 27 | +templates_path = ["_templates"] |
24 | 28 |
|
25 |
| -source_suffix = '.rst' |
| 29 | +source_suffix = ".rst" |
26 | 30 |
|
27 | 31 | # The master toctree document.
|
28 |
| -master_doc = 'index' |
| 32 | +master_doc = "index" |
29 | 33 |
|
30 | 34 | # General information about the project.
|
31 |
| -project = u'Adafruit CircuitPython SimpleIO Library' |
32 |
| -copyright = u'2017 Scott Shawcroft' |
33 |
| -author = u'Scott Shawcroft' |
| 35 | +project = u"Adafruit CircuitPython SimpleIO Library" |
| 36 | +copyright = u"2017 Scott Shawcroft" |
| 37 | +author = u"Scott Shawcroft" |
34 | 38 |
|
35 | 39 | # The version info for the project you're documenting, acts as replacement for
|
36 | 40 | # |version| and |release|, also used in various other places throughout the
|
37 | 41 | # built documents.
|
38 | 42 | #
|
39 | 43 | # The short X.Y version.
|
40 |
| -version = u'1.0' |
| 44 | +version = u"1.0" |
41 | 45 | # The full version, including alpha/beta/rc tags.
|
42 |
| -release = u'1.0' |
| 46 | +release = u"1.0" |
43 | 47 |
|
44 | 48 | # The language for content autogenerated by Sphinx. Refer to documentation
|
45 | 49 | # for a list of supported languages.
|
|
51 | 55 | # List of patterns, relative to source directory, that match files and
|
52 | 56 | # directories to ignore when looking for source files.
|
53 | 57 | # This patterns also effect to html_static_path and html_extra_path
|
54 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md'] |
| 58 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] |
55 | 59 |
|
56 | 60 | # The reST default role (used for this markup: `text`) to use for all
|
57 | 61 | # documents.
|
|
63 | 67 | add_function_parentheses = True
|
64 | 68 |
|
65 | 69 | # The name of the Pygments (syntax highlighting) style to use.
|
66 |
| -pygments_style = 'sphinx' |
| 70 | +pygments_style = "sphinx" |
67 | 71 |
|
68 | 72 | # If true, `todo` and `todoList` produce output, else they produce nothing.
|
69 | 73 | todo_include_todos = False
|
|
77 | 81 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
78 | 82 | # a list of builtin themes.
|
79 | 83 | #
|
80 |
| -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 84 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
81 | 85 |
|
82 | 86 | if not on_rtd: # only import and set the theme if we're building docs locally
|
83 | 87 | try:
|
84 | 88 | import sphinx_rtd_theme
|
85 |
| - html_theme = 'sphinx_rtd_theme' |
86 |
| - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] |
| 89 | + |
| 90 | + html_theme = "sphinx_rtd_theme" |
| 91 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] |
87 | 92 | except:
|
88 |
| - html_theme = 'default' |
89 |
| - html_theme_path = ['.'] |
| 93 | + html_theme = "default" |
| 94 | + html_theme_path = ["."] |
90 | 95 | else:
|
91 |
| - html_theme_path = ['.'] |
| 96 | + html_theme_path = ["."] |
92 | 97 |
|
93 | 98 | # Add any paths that contain custom static files (such as style sheets) here,
|
94 | 99 | # relative to this directory. They are copied after the builtin static files,
|
95 | 100 | # so a file named "default.css" will overwrite the builtin "default.css".
|
96 |
| -html_static_path = ['_static'] |
| 101 | +html_static_path = ["_static"] |
97 | 102 |
|
98 | 103 | # The name of an image file (relative to this directory) to use as a favicon of
|
99 | 104 | # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
100 | 105 | # pixels large.
|
101 | 106 | #
|
102 |
| -html_favicon = '_static/favicon.ico' |
| 107 | +html_favicon = "_static/favicon.ico" |
103 | 108 |
|
104 | 109 | # Output file base name for HTML help builder.
|
105 |
| -htmlhelp_basename = 'AdafruitSimpleIOLibrarydoc' |
| 110 | +htmlhelp_basename = "AdafruitSimpleIOLibrarydoc" |
106 | 111 |
|
107 | 112 | # -- Options for LaTeX output ---------------------------------------------
|
108 | 113 |
|
109 | 114 | latex_elements = {
|
110 |
| - # The paper size ('letterpaper' or 'a4paper'). |
111 |
| - # |
112 |
| - # 'papersize': 'letterpaper', |
113 |
| - |
114 |
| - # The font size ('10pt', '11pt' or '12pt'). |
115 |
| - # |
116 |
| - # 'pointsize': '10pt', |
117 |
| - |
118 |
| - # Additional stuff for the LaTeX preamble. |
119 |
| - # |
120 |
| - # 'preamble': '', |
121 |
| - |
122 |
| - # Latex figure (float) alignment |
123 |
| - # |
124 |
| - # 'figure_align': 'htbp', |
| 115 | + # The paper size ('letterpaper' or 'a4paper'). |
| 116 | + # |
| 117 | + # 'papersize': 'letterpaper', |
| 118 | + # The font size ('10pt', '11pt' or '12pt'). |
| 119 | + # |
| 120 | + # 'pointsize': '10pt', |
| 121 | + # Additional stuff for the LaTeX preamble. |
| 122 | + # |
| 123 | + # 'preamble': '', |
| 124 | + # Latex figure (float) alignment |
| 125 | + # |
| 126 | + # 'figure_align': 'htbp', |
125 | 127 | }
|
126 | 128 |
|
127 | 129 | # Grouping the document tree into LaTeX files. List of tuples
|
128 | 130 | # (source start file, target name, title,
|
129 | 131 | # author, documentclass [howto, manual, or own class]).
|
130 | 132 | latex_documents = [
|
131 |
| - (master_doc, 'AdafruitSimpleIOLibrary.tex', u'Adafruit SimpleIO Library Documentation', |
132 |
| - u'Scott Shawcroft', 'manual'), |
| 133 | + ( |
| 134 | + master_doc, |
| 135 | + "AdafruitSimpleIOLibrary.tex", |
| 136 | + u"Adafruit SimpleIO Library Documentation", |
| 137 | + u"Scott Shawcroft", |
| 138 | + "manual", |
| 139 | + ), |
133 | 140 | ]
|
134 | 141 |
|
135 | 142 | # -- Options for manual page output ---------------------------------------
|
136 | 143 |
|
137 | 144 | # One entry per manual page. List of tuples
|
138 | 145 | # (source start file, name, description, authors, manual section).
|
139 | 146 | man_pages = [
|
140 |
| - (master_doc, 'adafruitSimpleIOlibrary', u'Adafruit SimpleIO Library Documentation', |
141 |
| - [author], 1) |
| 147 | + ( |
| 148 | + master_doc, |
| 149 | + "adafruitSimpleIOlibrary", |
| 150 | + u"Adafruit SimpleIO Library Documentation", |
| 151 | + [author], |
| 152 | + 1, |
| 153 | + ) |
142 | 154 | ]
|
143 | 155 |
|
144 | 156 | # -- Options for Texinfo output -------------------------------------------
|
|
147 | 159 | # (source start file, target name, title, author,
|
148 | 160 | # dir menu entry, description, category)
|
149 | 161 | texinfo_documents = [
|
150 |
| - (master_doc, 'AdafruitSimpleIOLibrary', u'Adafruit SimpleIO Library Documentation', |
151 |
| - author, 'AdafruitSimpleIOLibrary', 'One line description of project.', |
152 |
| - 'Miscellaneous'), |
| 162 | + ( |
| 163 | + master_doc, |
| 164 | + "AdafruitSimpleIOLibrary", |
| 165 | + u"Adafruit SimpleIO Library Documentation", |
| 166 | + author, |
| 167 | + "AdafruitSimpleIOLibrary", |
| 168 | + "One line description of project.", |
| 169 | + "Miscellaneous", |
| 170 | + ), |
153 | 171 | ]
|
0 commit comments