|
18 | 18 | #
|
19 | 19 | import os
|
20 | 20 | import sys
|
21 |
| -sys.path.insert(0, os.path.abspath('..')) |
| 21 | + |
| 22 | +sys.path.insert(0, os.path.abspath("..")) |
22 | 23 |
|
23 | 24 | # -- General configuration ------------------------------------------------
|
24 | 25 |
|
|
30 | 31 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
31 | 32 | # ones.
|
32 | 33 | extensions = [
|
33 |
| - 'sphinx.ext.autodoc', |
34 |
| - 'sphinx.ext.todo', |
35 |
| - 'sphinx.ext.viewcode', |
36 |
| - 'sphinx.ext.intersphinx' |
| 34 | + "sphinx.ext.autodoc", |
| 35 | + "sphinx.ext.todo", |
| 36 | + "sphinx.ext.viewcode", |
| 37 | + "sphinx.ext.intersphinx", |
37 | 38 | ]
|
38 | 39 |
|
39 | 40 | # Uncomment the below if you use native CircuitPython modules such as
|
40 | 41 | # digitalio, micropython and busio. List the modules you use. Without it, the
|
41 | 42 | # autodoc module docs will fail to generate with a warning.
|
42 | 43 | # autodoc_mock_imports = ["micropython", "adafruit_bus_device", "adafruit_register"]
|
43 | 44 |
|
44 |
| -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} |
| 45 | +intersphinx_mapping = { |
| 46 | + "python": ("https://docs.python.org/3.4", None), |
| 47 | + "BusDevice": ( |
| 48 | + "https://circuitpython.readthedocs.io/projects/busdevice/en/latest/", |
| 49 | + None, |
| 50 | + ), |
| 51 | + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), |
| 52 | +} |
45 | 53 |
|
46 | 54 | # Mock out micropython ourselves.
|
47 |
| -#import imp |
48 |
| -#m = imp.new_module("micropython") |
49 |
| -#m.const = lambda x: x |
50 |
| -#sys.modules["micropython"] = m |
| 55 | +# import imp |
| 56 | +# m = imp.new_module("micropython") |
| 57 | +# m.const = lambda x: x |
| 58 | +# sys.modules["micropython"] = m |
51 | 59 |
|
52 | 60 | # Add any paths that contain templates here, relative to this directory.
|
53 |
| -templates_path = ['_templates'] |
| 61 | +templates_path = ["_templates"] |
54 | 62 |
|
55 | 63 | # The suffix(es) of source filenames.
|
56 | 64 | # You can specify multiple suffix as a list of string:
|
57 | 65 | #
|
58 |
| -#source_suffix = ['.rst', '.md'] |
59 |
| -source_suffix = '.rst' |
| 66 | +# source_suffix = ['.rst', '.md'] |
| 67 | +source_suffix = ".rst" |
60 | 68 |
|
61 | 69 | # The encoding of source files.
|
62 | 70 | #
|
63 | 71 | # source_encoding = 'utf-8-sig'
|
64 | 72 |
|
65 | 73 | # The master toctree document.
|
66 |
| -master_doc = 'index' |
| 74 | +master_doc = "index" |
67 | 75 |
|
68 | 76 | # General information about the project.
|
69 |
| -project = u'Adafruit\'s CCS811 Library' |
70 |
| -copyright = u'2016, Dean Miller, Scott Shawcroft' |
71 |
| -author = u'Dean Miller, Scott Shawcroft' |
| 77 | +project = u"Adafruit's CCS811 Library" |
| 78 | +copyright = u"2016, Dean Miller, Scott Shawcroft" |
| 79 | +author = u"Dean Miller, Scott Shawcroft" |
72 | 80 |
|
73 | 81 | # The version info for the project you're documenting, acts as replacement for
|
74 | 82 | # |version| and |release|, also used in various other places throughout the
|
75 | 83 | # built documents.
|
76 | 84 | #
|
77 | 85 | # The short X.Y version.
|
78 |
| -version = u'1.0' |
| 86 | +version = u"1.0" |
79 | 87 | # The full version, including alpha/beta/rc tags.
|
80 |
| -release = u'1.0' |
| 88 | +release = u"1.0" |
81 | 89 |
|
82 | 90 | # The language for content autogenerated by Sphinx. Refer to documentation
|
83 | 91 | # for a list of supported languages.
|
|
98 | 106 | # List of patterns, relative to source directory, that match files and
|
99 | 107 | # directories to ignore when looking for source files.
|
100 | 108 | # This patterns also effect to html_static_path and html_extra_path
|
101 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md'] |
| 109 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] |
102 | 110 |
|
103 | 111 | # The reST default role (used for this markup: `text`) to use for all
|
104 | 112 | # documents.
|
|
120 | 128 | # show_authors = False
|
121 | 129 |
|
122 | 130 | # The name of the Pygments (syntax highlighting) style to use.
|
123 |
| -pygments_style = 'sphinx' |
| 131 | +pygments_style = "sphinx" |
124 | 132 |
|
125 | 133 | # A list of ignored prefixes for module index sorting.
|
126 | 134 | # modindex_common_prefix = []
|
|
140 | 148 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
141 | 149 | # a list of builtin themes.
|
142 | 150 | #
|
143 |
| -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 151 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
144 | 152 |
|
145 | 153 | if not on_rtd: # only import and set the theme if we're building docs locally
|
146 | 154 | try:
|
147 | 155 | import sphinx_rtd_theme
|
148 |
| - html_theme = 'sphinx_rtd_theme' |
149 |
| - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] |
| 156 | + |
| 157 | + html_theme = "sphinx_rtd_theme" |
| 158 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] |
150 | 159 | except:
|
151 |
| - html_theme = 'default' |
152 |
| - html_theme_path = ['.'] |
| 160 | + html_theme = "default" |
| 161 | + html_theme_path = ["."] |
153 | 162 | else:
|
154 |
| - html_theme_path = ['.'] |
| 163 | + html_theme_path = ["."] |
155 | 164 |
|
156 | 165 | # Theme options are theme-specific and customize the look and feel of a theme
|
157 | 166 | # further. For a list of options available for each theme, see the
|
|
185 | 194 | # Add any paths that contain custom static files (such as style sheets) here,
|
186 | 195 | # relative to this directory. They are copied after the builtin static files,
|
187 | 196 | # so a file named "default.css" will overwrite the builtin "default.css".
|
188 |
| -html_static_path = ['_static'] |
| 197 | +html_static_path = ["_static"] |
189 | 198 |
|
190 | 199 | # The name of an image file (relative to this directory) to use as a favicon of
|
191 | 200 | # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
192 | 201 | # pixels large.
|
193 | 202 | #
|
194 |
| -html_favicon = '_static/favicon.ico' |
| 203 | +html_favicon = "_static/favicon.ico" |
195 | 204 |
|
196 | 205 | # Add any extra paths that contain custom files (such as robots.txt or
|
197 | 206 | # .htaccess) here, relative to this directory. These files are copied
|
|
276 | 285 | # -- Options for LaTeX output ---------------------------------------------
|
277 | 286 |
|
278 | 287 | latex_elements = {
|
279 |
| - # The paper size ('letterpaper' or 'a4paper'). |
280 |
| - # |
281 |
| - # 'papersize': 'letterpaper', |
282 |
| - |
283 |
| - # The font size ('10pt', '11pt' or '12pt'). |
284 |
| - # |
285 |
| - # 'pointsize': '10pt', |
286 |
| - |
287 |
| - # Additional stuff for the LaTeX preamble. |
288 |
| - # |
289 |
| - # 'preamble': '', |
290 |
| - |
291 |
| - # Latex figure (float) alignment |
292 |
| - # |
293 |
| - # 'figure_align': 'htbp', |
| 288 | + # The paper size ('letterpaper' or 'a4paper'). |
| 289 | + # |
| 290 | + # 'papersize': 'letterpaper', |
| 291 | + # The font size ('10pt', '11pt' or '12pt'). |
| 292 | + # |
| 293 | + # 'pointsize': '10pt', |
| 294 | + # Additional stuff for the LaTeX preamble. |
| 295 | + # |
| 296 | + # 'preamble': '', |
| 297 | + # Latex figure (float) alignment |
| 298 | + # |
| 299 | + # 'figure_align': 'htbp', |
294 | 300 | }
|
295 | 301 |
|
296 | 302 | # Grouping the document tree into LaTeX files. List of tuples
|
297 | 303 | # (source start file, target name, title,
|
298 | 304 | # author, documentclass [howto, manual, or own class]).
|
299 | 305 | latex_documents = [
|
300 |
| - (master_doc, 'AdafruitsCCS811Library.tex', u'Adafruit\'s CCS811 Library Documentation', |
301 |
| - u'Dean Miller, Scott Shawcroft', 'manual'), |
| 306 | + ( |
| 307 | + master_doc, |
| 308 | + "AdafruitsCCS811Library.tex", |
| 309 | + u"Adafruit's CCS811 Library Documentation", |
| 310 | + u"Dean Miller, Scott Shawcroft", |
| 311 | + "manual", |
| 312 | + ), |
302 | 313 | ]
|
303 | 314 |
|
304 | 315 | # The name of an image file (relative to this directory) to place at the top of
|
|
339 | 350 | # One entry per manual page. List of tuples
|
340 | 351 | # (source start file, name, description, authors, manual section).
|
341 | 352 | man_pages = [
|
342 |
| - (master_doc, 'AdafruitsCCS811Library23library', u'Adafruit\'s CCS811 Library Documentation', |
343 |
| - [author], 1) |
| 353 | + ( |
| 354 | + master_doc, |
| 355 | + "AdafruitsCCS811Library23library", |
| 356 | + u"Adafruit's CCS811 Library Documentation", |
| 357 | + [author], |
| 358 | + 1, |
| 359 | + ) |
344 | 360 | ]
|
345 | 361 |
|
346 | 362 | # If true, show URL addresses after external links.
|
|
354 | 370 | # (source start file, target name, title, author,
|
355 | 371 | # dir menu entry, description, category)
|
356 | 372 | texinfo_documents = [
|
357 |
| - (master_doc, 'AdafruitsCCS811Library', u'Adafruit\'s CCS811 Library Documentation', |
358 |
| - author, 'AdafruitsCCS811Library', 'One line description of project.', |
359 |
| - 'Miscellaneous'), |
| 373 | + ( |
| 374 | + master_doc, |
| 375 | + "AdafruitsCCS811Library", |
| 376 | + u"Adafruit's CCS811 Library Documentation", |
| 377 | + author, |
| 378 | + "AdafruitsCCS811Library", |
| 379 | + "One line description of project.", |
| 380 | + "Miscellaneous", |
| 381 | + ), |
360 | 382 | ]
|
361 | 383 |
|
362 | 384 | # Documents to append as an appendix to all manuals.
|
|
375 | 397 | #
|
376 | 398 | # texinfo_no_detailmenu = False
|
377 | 399 |
|
378 |
| -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None), |
379 |
| - 'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} |
| 400 | +intersphinx_mapping = { |
| 401 | + "python": ("https://docs.python.org/3.4", None), |
| 402 | + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), |
| 403 | +} |
0 commit comments