|
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 = ["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),'Register': ('https://circuitpython.readthedocs.io/projects/register/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 | + "Register": ( |
| 52 | + "https://circuitpython.readthedocs.io/projects/register/en/latest/", |
| 53 | + None, |
| 54 | + ), |
| 55 | + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), |
| 56 | +} |
45 | 57 |
|
46 | 58 | # Add any paths that contain templates here, relative to this directory.
|
47 |
| -templates_path = ['_templates'] |
| 59 | +templates_path = ["_templates"] |
48 | 60 |
|
49 | 61 | # The suffix(es) of source filenames.
|
50 | 62 | # You can specify multiple suffix as a list of string:
|
51 | 63 | #
|
52 |
| -source_suffix = ['.rst', '.md'] |
| 64 | +source_suffix = [".rst", ".md"] |
53 | 65 | # source_suffix = '.rst'
|
54 | 66 |
|
55 | 67 | # The encoding of source files.
|
56 | 68 | #
|
57 | 69 | # source_encoding = 'utf-8-sig'
|
58 | 70 |
|
59 | 71 | # The master toctree document.
|
60 |
| -master_doc = 'index' |
| 72 | +master_doc = "index" |
61 | 73 |
|
62 | 74 | # General information about the project.
|
63 |
| -project = u'Adafruit\'s DS3231 RTC Library' |
64 |
| -copyright = u'2016, Philip Moyer' |
65 |
| -author = u'Philip Moyer' |
| 75 | +project = u"Adafruit's DS3231 RTC Library" |
| 76 | +copyright = u"2016, Philip Moyer" |
| 77 | +author = u"Philip Moyer" |
66 | 78 |
|
67 | 79 | # The version info for the project you're documenting, acts as replacement for
|
68 | 80 | # |version| and |release|, also used in various other places throughout the
|
69 | 81 | # built documents.
|
70 | 82 | #
|
71 | 83 | # The short X.Y version.
|
72 |
| -version = u'1.0' |
| 84 | +version = u"1.0" |
73 | 85 | # The full version, including alpha/beta/rc tags.
|
74 |
| -release = u'1.0' |
| 86 | +release = u"1.0" |
75 | 87 |
|
76 | 88 | # The language for content autogenerated by Sphinx. Refer to documentation
|
77 | 89 | # for a list of supported languages.
|
|
92 | 104 | # List of patterns, relative to source directory, that match files and
|
93 | 105 | # directories to ignore when looking for source files.
|
94 | 106 | # This patterns also effect to html_static_path and html_extra_path
|
95 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md'] |
| 107 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] |
96 | 108 |
|
97 | 109 | # The reST default role (used for this markup: `text`) to use for all
|
98 | 110 | # documents.
|
|
114 | 126 | # show_authors = False
|
115 | 127 |
|
116 | 128 | # The name of the Pygments (syntax highlighting) style to use.
|
117 |
| -pygments_style = 'sphinx' |
| 129 | +pygments_style = "sphinx" |
118 | 130 |
|
119 | 131 | # A list of ignored prefixes for module index sorting.
|
120 | 132 | # modindex_common_prefix = []
|
|
134 | 146 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
135 | 147 | # a list of builtin themes.
|
136 | 148 | #
|
137 |
| -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 149 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
138 | 150 |
|
139 | 151 | if not on_rtd: # only import and set the theme if we're building docs locally
|
140 | 152 | try:
|
141 | 153 | import sphinx_rtd_theme
|
142 |
| - html_theme = 'sphinx_rtd_theme' |
143 |
| - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] |
| 154 | + |
| 155 | + html_theme = "sphinx_rtd_theme" |
| 156 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] |
144 | 157 | except:
|
145 |
| - html_theme = 'default' |
146 |
| - html_theme_path = ['.'] |
| 158 | + html_theme = "default" |
| 159 | + html_theme_path = ["."] |
147 | 160 | else:
|
148 |
| - html_theme_path = ['.'] |
| 161 | + html_theme_path = ["."] |
149 | 162 |
|
150 | 163 | # Theme options are theme-specific and customize the look and feel of a theme
|
151 | 164 | # further. For a list of options available for each theme, see the
|
|
179 | 192 | # Add any paths that contain custom static files (such as style sheets) here,
|
180 | 193 | # relative to this directory. They are copied after the builtin static files,
|
181 | 194 | # so a file named "default.css" will overwrite the builtin "default.css".
|
182 |
| -html_static_path = ['_static'] |
| 195 | +html_static_path = ["_static"] |
183 | 196 |
|
184 | 197 | # The name of an image file (relative to this directory) to use as a favicon of
|
185 | 198 | # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
186 | 199 | # pixels large.
|
187 | 200 | #
|
188 |
| -html_favicon = '_static/favicon.ico' |
| 201 | +html_favicon = "_static/favicon.ico" |
189 | 202 |
|
190 | 203 | # Add any extra paths that contain custom files (such as robots.txt or
|
191 | 204 | # .htaccess) here, relative to this directory. These files are copied
|
|
265 | 278 | # html_search_scorer = 'scorer.js'
|
266 | 279 |
|
267 | 280 | # Output file base name for HTML help builder.
|
268 |
| -htmlhelp_basename = 'AdafruitsDS3231RTCLibrarydoc' |
| 281 | +htmlhelp_basename = "AdafruitsDS3231RTCLibrarydoc" |
269 | 282 |
|
270 | 283 | # -- Options for LaTeX output ---------------------------------------------
|
271 | 284 |
|
272 | 285 | latex_elements = {
|
273 |
| - # The paper size ('letterpaper' or 'a4paper'). |
274 |
| - # |
275 |
| - # 'papersize': 'letterpaper', |
276 |
| - |
277 |
| - # The font size ('10pt', '11pt' or '12pt'). |
278 |
| - # |
279 |
| - # 'pointsize': '10pt', |
280 |
| - |
281 |
| - # Additional stuff for the LaTeX preamble. |
282 |
| - # |
283 |
| - # 'preamble': '', |
284 |
| - |
285 |
| - # Latex figure (float) alignment |
286 |
| - # |
287 |
| - # 'figure_align': 'htbp', |
| 286 | + # The paper size ('letterpaper' or 'a4paper'). |
| 287 | + # |
| 288 | + # 'papersize': 'letterpaper', |
| 289 | + # The font size ('10pt', '11pt' or '12pt'). |
| 290 | + # |
| 291 | + # 'pointsize': '10pt', |
| 292 | + # Additional stuff for the LaTeX preamble. |
| 293 | + # |
| 294 | + # 'preamble': '', |
| 295 | + # Latex figure (float) alignment |
| 296 | + # |
| 297 | + # 'figure_align': 'htbp', |
288 | 298 | }
|
289 | 299 |
|
290 | 300 | # Grouping the document tree into LaTeX files. List of tuples
|
291 | 301 | # (source start file, target name, title,
|
292 | 302 | # author, documentclass [howto, manual, or own class]).
|
293 | 303 | latex_documents = [
|
294 |
| - (master_doc, 'AdafruitsDS3231RTCLibrary.tex', u'Adafruit\'s DS3231 RTC Library Documentation', |
295 |
| - u'Philip Moyer', 'manual'), |
| 304 | + ( |
| 305 | + master_doc, |
| 306 | + "AdafruitsDS3231RTCLibrary.tex", |
| 307 | + u"Adafruit's DS3231 RTC Library Documentation", |
| 308 | + u"Philip Moyer", |
| 309 | + "manual", |
| 310 | + ), |
296 | 311 | ]
|
297 | 312 |
|
298 | 313 | # The name of an image file (relative to this directory) to place at the top of
|
|
333 | 348 | # One entry per manual page. List of tuples
|
334 | 349 | # (source start file, name, description, authors, manual section).
|
335 | 350 | man_pages = [
|
336 |
| - (master_doc, 'adafruitsds3231rtclibrary', u'Adafruit\'s DS3231 RTC Library Documentation', |
337 |
| - [author], 1) |
| 351 | + ( |
| 352 | + master_doc, |
| 353 | + "adafruitsds3231rtclibrary", |
| 354 | + u"Adafruit's DS3231 RTC Library Documentation", |
| 355 | + [author], |
| 356 | + 1, |
| 357 | + ) |
338 | 358 | ]
|
339 | 359 |
|
340 | 360 | # If true, show URL addresses after external links.
|
|
348 | 368 | # (source start file, target name, title, author,
|
349 | 369 | # dir menu entry, description, category)
|
350 | 370 | texinfo_documents = [
|
351 |
| - (master_doc, 'AdafruitsDS3231RTCLibrary', u'Adafruit\'s DS3231 RTC Library Documentation', |
352 |
| - author, 'AdafruitsDS3231RTCLibrary', 'One line description of project.', |
353 |
| - 'Miscellaneous'), |
| 371 | + ( |
| 372 | + master_doc, |
| 373 | + "AdafruitsDS3231RTCLibrary", |
| 374 | + u"Adafruit's DS3231 RTC Library Documentation", |
| 375 | + author, |
| 376 | + "AdafruitsDS3231RTCLibrary", |
| 377 | + "One line description of project.", |
| 378 | + "Miscellaneous", |
| 379 | + ), |
354 | 380 | ]
|
355 | 381 |
|
356 | 382 | # Documents to append as an appendix to all manuals.
|
|
0 commit comments