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