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