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