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