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