|
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 |
| -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None), |
19 |
| - 'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} |
| 19 | +intersphinx_mapping = { |
| 20 | + "python": ("https://docs.python.org/3.4", None), |
| 21 | + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), |
| 22 | +} |
20 | 23 |
|
21 | 24 | # Show the docstring from both the class and its __init__() method
|
22 |
| -autoclass_content = 'both' |
23 |
| -autodoc_member_order = 'bysource' |
| 25 | +autoclass_content = "both" |
| 26 | +autodoc_member_order = "bysource" |
24 | 27 |
|
25 | 28 | # Add any paths that contain templates here, relative to this directory.
|
26 |
| -templates_path = ['_templates'] |
| 29 | +templates_path = ["_templates"] |
27 | 30 |
|
28 |
| -source_suffix = '.rst' |
| 31 | +source_suffix = ".rst" |
29 | 32 |
|
30 | 33 | # The master toctree document.
|
31 |
| -master_doc = 'index' |
| 34 | +master_doc = "index" |
32 | 35 |
|
33 | 36 | # General information about the project.
|
34 |
| -project = u'Adafruit HCSR04 Library' |
35 |
| -copyright = u'2017 Mike Mabey' |
36 |
| -author = u'Mike Mabey' |
| 37 | +project = u"Adafruit HCSR04 Library" |
| 38 | +copyright = u"2017 Mike Mabey" |
| 39 | +author = u"Mike Mabey" |
37 | 40 |
|
38 | 41 | # The version info for the project you're documenting, acts as replacement for
|
39 | 42 | # |version| and |release|, also used in various other places throughout the
|
40 | 43 | # built documents.
|
41 | 44 | #
|
42 | 45 | # The full version, including alpha/beta/rc tags.
|
43 |
| -release = open('../VERSION').read().strip() |
| 46 | +release = open("../VERSION").read().strip() |
44 | 47 | # The short X.Y version.
|
45 |
| -version = '.'.join(release.split('.')[:2]) |
| 48 | +version = ".".join(release.split(".")[:2]) |
46 | 49 |
|
47 | 50 | # The language for content autogenerated by Sphinx. Refer to documentation
|
48 | 51 | # for a list of supported languages.
|
|
54 | 57 | # List of patterns, relative to source directory, that match files and
|
55 | 58 | # directories to ignore when looking for source files.
|
56 | 59 | # This patterns also effect to html_static_path and html_extra_path
|
57 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 60 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
58 | 61 |
|
59 | 62 | # The reST default role (used for this markup: `text`) to use for all
|
60 | 63 | # documents.
|
|
66 | 69 | add_function_parentheses = True
|
67 | 70 |
|
68 | 71 | # The name of the Pygments (syntax highlighting) style to use.
|
69 |
| -pygments_style = 'sphinx' |
| 72 | +pygments_style = "sphinx" |
70 | 73 |
|
71 | 74 | # If true, `todo` and `todoList` produce output, else they produce nothing.
|
72 | 75 | todo_include_todos = False
|
|
77 | 80 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
78 | 81 | # a list of builtin themes.
|
79 | 82 | #
|
80 |
| -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 83 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
81 | 84 |
|
82 | 85 | if not on_rtd: # only import and set the theme if we're building docs locally
|
83 | 86 | try:
|
84 | 87 | import sphinx_rtd_theme
|
85 |
| - html_theme = 'sphinx_rtd_theme' |
86 |
| - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] |
| 88 | + |
| 89 | + html_theme = "sphinx_rtd_theme" |
| 90 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] |
87 | 91 | except:
|
88 |
| - html_theme = 'default' |
89 |
| - html_theme_path = ['.'] |
| 92 | + html_theme = "default" |
| 93 | + html_theme_path = ["."] |
90 | 94 | else:
|
91 |
| - html_theme_path = ['.'] |
| 95 | + html_theme_path = ["."] |
92 | 96 |
|
93 | 97 | # Add any paths that contain custom static files (such as style sheets) here,
|
94 | 98 | # relative to this directory. They are copied after the builtin static files,
|
95 | 99 | # so a file named "default.css" will overwrite the builtin "default.css".
|
96 |
| -html_static_path = ['_static'] |
| 100 | +html_static_path = ["_static"] |
97 | 101 |
|
98 | 102 | # Output file base name for HTML help builder.
|
99 |
| -htmlhelp_basename = 'AdafruitHCSR04Librarydoc' |
| 103 | +htmlhelp_basename = "AdafruitHCSR04Librarydoc" |
100 | 104 |
|
101 | 105 | # -- Options for LaTeX output ---------------------------------------------
|
102 | 106 |
|
103 | 107 | latex_elements = {
|
104 |
| - # The paper size ('letterpaper' or 'a4paper'). |
105 |
| - # |
106 |
| - # 'papersize': 'letterpaper', |
107 |
| - |
108 |
| - # The font size ('10pt', '11pt' or '12pt'). |
109 |
| - # |
110 |
| - # 'pointsize': '10pt', |
111 |
| - |
112 |
| - # Additional stuff for the LaTeX preamble. |
113 |
| - # |
114 |
| - # 'preamble': '', |
115 |
| - |
116 |
| - # Latex figure (float) alignment |
117 |
| - # |
118 |
| - # 'figure_align': 'htbp', |
| 108 | + # The paper size ('letterpaper' or 'a4paper'). |
| 109 | + # |
| 110 | + # 'papersize': 'letterpaper', |
| 111 | + # The font size ('10pt', '11pt' or '12pt'). |
| 112 | + # |
| 113 | + # 'pointsize': '10pt', |
| 114 | + # Additional stuff for the LaTeX preamble. |
| 115 | + # |
| 116 | + # 'preamble': '', |
| 117 | + # Latex figure (float) alignment |
| 118 | + # |
| 119 | + # 'figure_align': 'htbp', |
119 | 120 | }
|
120 | 121 |
|
121 | 122 | # Grouping the document tree into LaTeX files. List of tuples
|
122 | 123 | # (source start file, target name, title,
|
123 | 124 | # author, documentclass [howto, manual, or own class]).
|
124 | 125 | latex_documents = [
|
125 |
| - (master_doc, 'AdafruitHCSR04Library.tex', u'Adafruit HCSR04 Library Documentation', |
126 |
| - author, 'manual'), |
| 126 | + ( |
| 127 | + master_doc, |
| 128 | + "AdafruitHCSR04Library.tex", |
| 129 | + u"Adafruit HCSR04 Library Documentation", |
| 130 | + author, |
| 131 | + "manual", |
| 132 | + ), |
127 | 133 | ]
|
128 | 134 |
|
129 | 135 | # -- Options for manual page output ---------------------------------------
|
130 | 136 |
|
131 | 137 | # One entry per manual page. List of tuples
|
132 | 138 | # (source start file, name, description, authors, manual section).
|
133 | 139 | man_pages = [
|
134 |
| - (master_doc, 'adafruitHCSR04library', u'Adafruit HCSR04 Library Documentation', |
135 |
| - [author], 1) |
| 140 | + ( |
| 141 | + master_doc, |
| 142 | + "adafruitHCSR04library", |
| 143 | + u"Adafruit HCSR04 Library Documentation", |
| 144 | + [author], |
| 145 | + 1, |
| 146 | + ) |
136 | 147 | ]
|
137 | 148 |
|
138 | 149 | # -- Options for Texinfo output -------------------------------------------
|
|
141 | 152 | # (source start file, target name, title, author,
|
142 | 153 | # dir menu entry, description, category)
|
143 | 154 | texinfo_documents = [
|
144 |
| - (master_doc, 'AdafruitHCSR04Library', u'Adafruit HCSR04 Library Documentation', |
145 |
| - author, 'AdafruitHCSR04Library', 'One line description of project.', |
146 |
| - 'Miscellaneous'), |
| 155 | + ( |
| 156 | + master_doc, |
| 157 | + "AdafruitHCSR04Library", |
| 158 | + u"Adafruit HCSR04 Library Documentation", |
| 159 | + author, |
| 160 | + "AdafruitHCSR04Library", |
| 161 | + "One line description of project.", |
| 162 | + "Miscellaneous", |
| 163 | + ), |
147 | 164 | ]
|
0 commit comments