|
12 | 12 | # All configuration values have a default; values that are commented out |
13 | 13 | # serve to show the default. |
14 | 14 |
|
15 | | -import sys |
16 | 15 | import os |
| 16 | +import sys |
17 | 17 |
|
18 | 18 | from sphinx.application import Sphinx |
19 | 19 | from sphinx.util.docfields import Field |
20 | 20 |
|
21 | 21 | # If extensions (or modules to document with autodoc) are in another directory, |
22 | 22 | # add these directories to sys.path here. If the directory is relative to the |
23 | 23 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
24 | | -sys.path.insert(0, os.path.abspath('../..')) |
| 24 | +sys.path.insert(0, os.path.abspath("../..")) |
25 | 25 |
|
26 | 26 | from mypy.version import __version__ as mypy_version |
27 | 27 |
|
28 | 28 | # -- General configuration ------------------------------------------------ |
29 | 29 |
|
30 | 30 | # If your documentation needs a minimal Sphinx version, state it here. |
31 | | -#needs_sphinx = '1.0' |
| 31 | +# needs_sphinx = '1.0' |
32 | 32 |
|
33 | 33 | # Add any Sphinx extension module names here, as strings. They can be |
34 | 34 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
35 | 35 | # ones. |
36 | | -extensions = ['sphinx.ext.intersphinx'] |
| 36 | +extensions = ["sphinx.ext.intersphinx"] |
37 | 37 |
|
38 | 38 | # Add any paths that contain templates here, relative to this directory. |
39 | | -templates_path = ['_templates'] |
| 39 | +templates_path = ["_templates"] |
40 | 40 |
|
41 | 41 | # The suffix of source filenames. |
42 | | -source_suffix = '.rst' |
| 42 | +source_suffix = ".rst" |
43 | 43 |
|
44 | 44 | # The encoding of source files. |
45 | | -#source_encoding = 'utf-8-sig' |
| 45 | +# source_encoding = 'utf-8-sig' |
46 | 46 |
|
47 | 47 | # The master toctree document. |
48 | | -master_doc = 'index' |
| 48 | +master_doc = "index" |
49 | 49 |
|
50 | 50 | # General information about the project. |
51 | | -project = u'mypy' |
52 | | -copyright = u'2012-2022 Jukka Lehtosalo and mypy contributors' |
| 51 | +project = "mypy" |
| 52 | +copyright = "2012-2022 Jukka Lehtosalo and mypy contributors" |
53 | 53 |
|
54 | 54 | # The version info for the project you're documenting, acts as replacement for |
55 | 55 | # |version| and |release|, also used in various other places throughout the |
56 | 56 | # built documents. |
57 | 57 | # |
58 | 58 | # The short X.Y version. |
59 | | -version = mypy_version.split('-')[0] |
| 59 | +version = mypy_version.split("-")[0] |
60 | 60 | # The full version, including alpha/beta/rc tags. |
61 | 61 | release = mypy_version |
62 | 62 |
|
63 | 63 | # The language for content autogenerated by Sphinx. Refer to documentation |
64 | 64 | # for a list of supported languages. |
65 | | -#language = None |
| 65 | +# language = None |
66 | 66 |
|
67 | 67 | # There are two options for replacing |today|: either, you set today to some |
68 | 68 | # non-false value, then it is used: |
69 | | -#today = '' |
| 69 | +# today = '' |
70 | 70 | # Else, today_fmt is used as the format for a strftime call. |
71 | | -#today_fmt = '%B %d, %Y' |
| 71 | +# today_fmt = '%B %d, %Y' |
72 | 72 |
|
73 | 73 | # List of patterns, relative to source directory, that match files and |
74 | 74 | # directories to ignore when looking for source files. |
75 | 75 | exclude_patterns = [] |
76 | 76 |
|
77 | 77 | # The reST default role (used for this markup: `text`) to use for all |
78 | 78 | # documents. |
79 | | -#default_role = None |
| 79 | +# default_role = None |
80 | 80 |
|
81 | 81 | # If true, '()' will be appended to :func: etc. cross-reference text. |
82 | | -#add_function_parentheses = True |
| 82 | +# add_function_parentheses = True |
83 | 83 |
|
84 | 84 | # If true, the current module name will be prepended to all description |
85 | 85 | # unit titles (such as .. function::). |
86 | | -#add_module_names = True |
| 86 | +# add_module_names = True |
87 | 87 |
|
88 | 88 | # If true, sectionauthor and moduleauthor directives will be shown in the |
89 | 89 | # output. They are ignored by default. |
90 | | -#show_authors = False |
| 90 | +# show_authors = False |
91 | 91 |
|
92 | 92 | # The name of the Pygments (syntax highlighting) style to use. |
93 | | -pygments_style = 'sphinx' |
| 93 | +pygments_style = "sphinx" |
94 | 94 |
|
95 | 95 | # A list of ignored prefixes for module index sorting. |
96 | | -#modindex_common_prefix = [] |
| 96 | +# modindex_common_prefix = [] |
97 | 97 |
|
98 | 98 | # If true, keep warnings as "system message" paragraphs in the built documents. |
99 | | -#keep_warnings = False |
| 99 | +# keep_warnings = False |
100 | 100 |
|
101 | 101 |
|
102 | 102 | # -- Options for HTML output ---------------------------------------------- |
|
108 | 108 | # Theme options are theme-specific and customize the look and feel of a theme |
109 | 109 | # further. For a list of options available for each theme, see the |
110 | 110 | # documentation. |
111 | | -#html_theme_options = {} |
| 111 | +# html_theme_options = {} |
112 | 112 |
|
113 | 113 | # Add any paths that contain custom themes here, relative to this directory. |
114 | | -#html_theme_path = [] |
| 114 | +# html_theme_path = [] |
115 | 115 |
|
116 | 116 | # The name for this set of Sphinx documents. If None, it defaults to |
117 | 117 | # "<project> v<release> documentation". |
118 | | -#html_title = None |
| 118 | +# html_title = None |
119 | 119 |
|
120 | 120 | # A shorter title for the navigation bar. Default is the same as html_title. |
121 | | -#html_short_title = None |
| 121 | +# html_short_title = None |
122 | 122 |
|
123 | 123 | # The name of an image file (relative to this directory) to place at the top |
124 | 124 | # of the sidebar. |
|
127 | 127 | # The name of an image file (within the static path) to use as favicon of the |
128 | 128 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
129 | 129 | # pixels large. |
130 | | -#html_favicon = None |
| 130 | +# html_favicon = None |
131 | 131 |
|
132 | 132 | # Add any paths that contain custom static files (such as style sheets) here, |
133 | 133 | # relative to this directory. They are copied after the builtin static files, |
134 | 134 | # so a file named "default.css" will overwrite the builtin "default.css". |
135 | | -#html_static_path = ['_static'] |
| 135 | +# html_static_path = ['_static'] |
136 | 136 |
|
137 | 137 | # Add any extra paths that contain custom files (such as robots.txt or |
138 | 138 | # .htaccess) here, relative to this directory. These files are copied |
139 | 139 | # directly to the root of the documentation. |
140 | | -#html_extra_path = [] |
| 140 | +# html_extra_path = [] |
141 | 141 |
|
142 | 142 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
143 | 143 | # using the given strftime format. |
144 | | -#html_last_updated_fmt = '%b %d, %Y' |
| 144 | +# html_last_updated_fmt = '%b %d, %Y' |
145 | 145 |
|
146 | 146 | # If true, SmartyPants will be used to convert quotes and dashes to |
147 | 147 | # typographically correct entities. |
148 | | -#html_use_smartypants = True |
| 148 | +# html_use_smartypants = True |
149 | 149 |
|
150 | 150 | # Custom sidebar templates, maps document names to template names. |
151 | | -#html_sidebars = {} |
| 151 | +# html_sidebars = {} |
152 | 152 |
|
153 | 153 | # Additional templates that should be rendered to pages, maps page names to |
154 | 154 | # template names. |
155 | | -#html_additional_pages = {} |
| 155 | +# html_additional_pages = {} |
156 | 156 |
|
157 | 157 | # If false, no module index is generated. |
158 | | -#html_domain_indices = True |
| 158 | +# html_domain_indices = True |
159 | 159 |
|
160 | 160 | # If false, no index is generated. |
161 | | -#html_use_index = True |
| 161 | +# html_use_index = True |
162 | 162 |
|
163 | 163 | # If true, the index is split into individual pages for each letter. |
164 | | -#html_split_index = False |
| 164 | +# html_split_index = False |
165 | 165 |
|
166 | 166 | # If true, links to the reST sources are added to the pages. |
167 | | -#html_show_sourcelink = True |
| 167 | +# html_show_sourcelink = True |
168 | 168 |
|
169 | 169 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
170 | | -#html_show_sphinx = True |
| 170 | +# html_show_sphinx = True |
171 | 171 |
|
172 | 172 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
173 | | -#html_show_copyright = True |
| 173 | +# html_show_copyright = True |
174 | 174 |
|
175 | 175 | # If true, an OpenSearch description file will be output, and all pages will |
176 | 176 | # contain a <link> tag referring to it. The value of this option must be the |
177 | 177 | # base URL from which the finished HTML is served. |
178 | | -#html_use_opensearch = '' |
| 178 | +# html_use_opensearch = '' |
179 | 179 |
|
180 | 180 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
181 | | -#html_file_suffix = None |
| 181 | +# html_file_suffix = None |
182 | 182 |
|
183 | 183 | # Output file base name for HTML help builder. |
184 | | -htmlhelp_basename = 'mypydoc' |
| 184 | +htmlhelp_basename = "mypydoc" |
185 | 185 |
|
186 | 186 |
|
187 | 187 | # -- Options for LaTeX output --------------------------------------------- |
188 | 188 |
|
189 | 189 | latex_elements = { |
190 | | -# The paper size ('letterpaper' or 'a4paper'). |
191 | | -#'papersize': 'letterpaper', |
192 | | - |
193 | | -# The font size ('10pt', '11pt' or '12pt'). |
194 | | -#'pointsize': '10pt', |
195 | | - |
196 | | -# Additional stuff for the LaTeX preamble. |
197 | | -#'preamble': '', |
| 190 | + # The paper size ('letterpaper' or 'a4paper'). |
| 191 | + #'papersize': 'letterpaper', |
| 192 | + # The font size ('10pt', '11pt' or '12pt'). |
| 193 | + #'pointsize': '10pt', |
| 194 | + # Additional stuff for the LaTeX preamble. |
| 195 | + #'preamble': '', |
198 | 196 | } |
199 | 197 |
|
200 | 198 | # Grouping the document tree into LaTeX files. List of tuples |
201 | 199 | # (source start file, target name, title, |
202 | 200 | # author, documentclass [howto, manual, or own class]). |
203 | | -latex_documents = [ |
204 | | - ('index', 'Mypy.tex', u'Mypy Documentation', |
205 | | - u'Jukka', 'manual'), |
206 | | -] |
| 201 | +latex_documents = [("index", "Mypy.tex", "Mypy Documentation", "Jukka", "manual")] |
207 | 202 |
|
208 | 203 | # The name of an image file (relative to this directory) to place at the top of |
209 | 204 | # the title page. |
210 | | -#latex_logo = None |
| 205 | +# latex_logo = None |
211 | 206 |
|
212 | 207 | # For "manual" documents, if this is true, then toplevel headings are parts, |
213 | 208 | # not chapters. |
214 | | -#latex_use_parts = False |
| 209 | +# latex_use_parts = False |
215 | 210 |
|
216 | 211 | # If true, show page references after internal links. |
217 | | -#latex_show_pagerefs = False |
| 212 | +# latex_show_pagerefs = False |
218 | 213 |
|
219 | 214 | # If true, show URL addresses after external links. |
220 | | -#latex_show_urls = False |
| 215 | +# latex_show_urls = False |
221 | 216 |
|
222 | 217 | # Documents to append as an appendix to all manuals. |
223 | | -#latex_appendices = [] |
| 218 | +# latex_appendices = [] |
224 | 219 |
|
225 | 220 | # If false, no module index is generated. |
226 | | -#latex_domain_indices = True |
| 221 | +# latex_domain_indices = True |
227 | 222 |
|
228 | 223 |
|
229 | 224 | # -- Options for manual page output --------------------------------------- |
230 | 225 |
|
231 | 226 | # One entry per manual page. List of tuples |
232 | 227 | # (source start file, name, description, authors, manual section). |
233 | | -man_pages = [ |
234 | | - ('index', 'mypy', u'Mypy Documentation', |
235 | | - [u'Jukka Lehtosalo'], 1) |
236 | | -] |
| 228 | +man_pages = [("index", "mypy", "Mypy Documentation", ["Jukka Lehtosalo"], 1)] |
237 | 229 |
|
238 | 230 | # If true, show URL addresses after external links. |
239 | | -#man_show_urls = False |
| 231 | +# man_show_urls = False |
240 | 232 |
|
241 | 233 |
|
242 | 234 | # -- Options for Texinfo output ------------------------------------------- |
|
245 | 237 | # (source start file, target name, title, author, |
246 | 238 | # dir menu entry, description, category) |
247 | 239 | texinfo_documents = [ |
248 | | - ('index', 'Mypy', u'Mypy Documentation', |
249 | | - u'Jukka', 'Mypy', 'One line description of project.', |
250 | | - 'Miscellaneous'), |
| 240 | + ( |
| 241 | + "index", |
| 242 | + "Mypy", |
| 243 | + "Mypy Documentation", |
| 244 | + "Jukka", |
| 245 | + "Mypy", |
| 246 | + "One line description of project.", |
| 247 | + "Miscellaneous", |
| 248 | + ) |
251 | 249 | ] |
252 | 250 |
|
253 | 251 | # Documents to append as an appendix to all manuals. |
254 | | -#texinfo_appendices = [] |
| 252 | +# texinfo_appendices = [] |
255 | 253 |
|
256 | 254 | # If false, no module index is generated. |
257 | | -#texinfo_domain_indices = True |
| 255 | +# texinfo_domain_indices = True |
258 | 256 |
|
259 | 257 | # How to display URL addresses: 'footnote', 'no', or 'inline'. |
260 | | -#texinfo_show_urls = 'footnote' |
| 258 | +# texinfo_show_urls = 'footnote' |
261 | 259 |
|
262 | 260 | # If true, do not generate a @detailmenu in the "Top" node's menu. |
263 | | -#texinfo_no_detailmenu = False |
| 261 | +# texinfo_no_detailmenu = False |
264 | 262 |
|
265 | | -rst_prolog = '.. |...| unicode:: U+2026 .. ellipsis\n' |
| 263 | +rst_prolog = ".. |...| unicode:: U+2026 .. ellipsis\n" |
266 | 264 |
|
267 | 265 | intersphinx_mapping = { |
268 | | - 'python': ('https://docs.python.org/3', None), |
269 | | - 'six': ('https://six.readthedocs.io', None), |
270 | | - 'attrs': ('http://www.attrs.org/en/stable', None), |
271 | | - 'cython': ('http://docs.cython.org/en/latest', None), |
272 | | - 'monkeytype': ('https://monkeytype.readthedocs.io/en/latest', None), |
273 | | - 'setuptools': ('https://setuptools.readthedocs.io/en/latest', None), |
| 266 | + "python": ("https://docs.python.org/3", None), |
| 267 | + "six": ("https://six.readthedocs.io", None), |
| 268 | + "attrs": ("http://www.attrs.org/en/stable", None), |
| 269 | + "cython": ("http://docs.cython.org/en/latest", None), |
| 270 | + "monkeytype": ("https://monkeytype.readthedocs.io/en/latest", None), |
| 271 | + "setuptools": ("https://setuptools.readthedocs.io/en/latest", None), |
274 | 272 | } |
275 | 273 |
|
276 | 274 |
|
277 | 275 | def setup(app: Sphinx) -> None: |
278 | 276 | app.add_object_type( |
279 | | - 'confval', |
280 | | - 'confval', |
281 | | - objname='configuration value', |
282 | | - indextemplate='pair: %s; configuration value', |
| 277 | + "confval", |
| 278 | + "confval", |
| 279 | + objname="configuration value", |
| 280 | + indextemplate="pair: %s; configuration value", |
283 | 281 | doc_field_types=[ |
284 | | - Field('type', label='Type', has_arg=False, names=('type',)), |
285 | | - Field('default', label='Default', has_arg=False, names=('default',)), |
286 | | - ] |
| 282 | + Field("type", label="Type", has_arg=False, names=("type",)), |
| 283 | + Field("default", label="Default", has_arg=False, names=("default",)), |
| 284 | + ], |
287 | 285 | ) |
0 commit comments