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