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