Skip to content

Commit 2b1997a

Browse files
committed
format files with black
1 parent 6c9096f commit 2b1997a

File tree

265 files changed

+31306
-22094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+31306
-22094
lines changed

conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os.path
22

33
pytest_plugins = [
4-
'mypy.test.data',
4+
"mypy.test.data",
55
]
66

77

@@ -14,5 +14,6 @@ def pytest_configure(config):
1414
# This function name is special to pytest. See
1515
# http://doc.pytest.org/en/latest/writing_plugins.html#initialization-command-line-and-configuration-hooks
1616
def pytest_addoption(parser) -> None:
17-
parser.addoption('--bench', action='store_true', default=False,
18-
help='Enable the benchmark test runs')
17+
parser.addoption(
18+
"--bench", action="store_true", default=False, help="Enable the benchmark test runs"
19+
)

docs/source/conf.py

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -21,82 +21,82 @@
2121
# If extensions (or modules to document with autodoc) are in another directory,
2222
# add these directories to sys.path here. If the directory is relative to the
2323
# 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("../.."))
2525

2626
from mypy.version import __version__ as mypy_version
2727

2828
# -- General configuration ------------------------------------------------
2929

3030
# If your documentation needs a minimal Sphinx version, state it here.
31-
#needs_sphinx = '1.0'
31+
# needs_sphinx = '1.0'
3232

3333
# Add any Sphinx extension module names here, as strings. They can be
3434
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3535
# ones.
36-
extensions = ['sphinx.ext.intersphinx']
36+
extensions = ["sphinx.ext.intersphinx"]
3737

3838
# Add any paths that contain templates here, relative to this directory.
39-
templates_path = ['_templates']
39+
templates_path = ["_templates"]
4040

4141
# The suffix of source filenames.
42-
source_suffix = '.rst'
42+
source_suffix = ".rst"
4343

4444
# The encoding of source files.
45-
#source_encoding = 'utf-8-sig'
45+
# source_encoding = 'utf-8-sig'
4646

4747
# The master toctree document.
48-
master_doc = 'index'
48+
master_doc = "index"
4949

5050
# 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"
5353

5454
# The version info for the project you're documenting, acts as replacement for
5555
# |version| and |release|, also used in various other places throughout the
5656
# built documents.
5757
#
5858
# The short X.Y version.
59-
version = mypy_version.split('-')[0]
59+
version = mypy_version.split("-")[0]
6060
# The full version, including alpha/beta/rc tags.
6161
release = mypy_version
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.
65-
#language = None
65+
# language = None
6666

6767
# There are two options for replacing |today|: either, you set today to some
6868
# non-false value, then it is used:
69-
#today = ''
69+
# today = ''
7070
# Else, today_fmt is used as the format for a strftime call.
71-
#today_fmt = '%B %d, %Y'
71+
# today_fmt = '%B %d, %Y'
7272

7373
# List of patterns, relative to source directory, that match files and
7474
# directories to ignore when looking for source files.
7575
exclude_patterns = []
7676

7777
# The reST default role (used for this markup: `text`) to use for all
7878
# documents.
79-
#default_role = None
79+
# default_role = None
8080

8181
# If true, '()' will be appended to :func: etc. cross-reference text.
82-
#add_function_parentheses = True
82+
# add_function_parentheses = True
8383

8484
# If true, the current module name will be prepended to all description
8585
# unit titles (such as .. function::).
86-
#add_module_names = True
86+
# add_module_names = True
8787

8888
# If true, sectionauthor and moduleauthor directives will be shown in the
8989
# output. They are ignored by default.
90-
#show_authors = False
90+
# show_authors = False
9191

9292
# The name of the Pygments (syntax highlighting) style to use.
93-
pygments_style = 'sphinx'
93+
pygments_style = "sphinx"
9494

9595
# A list of ignored prefixes for module index sorting.
96-
#modindex_common_prefix = []
96+
# modindex_common_prefix = []
9797

9898
# If true, keep warnings as "system message" paragraphs in the built documents.
99-
#keep_warnings = False
99+
# keep_warnings = False
100100

101101

102102
# -- Options for HTML output ----------------------------------------------
@@ -108,17 +108,17 @@
108108
# Theme options are theme-specific and customize the look and feel of a theme
109109
# further. For a list of options available for each theme, see the
110110
# documentation.
111-
#html_theme_options = {}
111+
# html_theme_options = {}
112112

113113
# Add any paths that contain custom themes here, relative to this directory.
114-
#html_theme_path = []
114+
# html_theme_path = []
115115

116116
# The name for this set of Sphinx documents. If None, it defaults to
117117
# "<project> v<release> documentation".
118-
#html_title = None
118+
# html_title = None
119119

120120
# A shorter title for the navigation bar. Default is the same as html_title.
121-
#html_short_title = None
121+
# html_short_title = None
122122

123123
# The name of an image file (relative to this directory) to place at the top
124124
# of the sidebar.
@@ -127,116 +127,110 @@
127127
# The name of an image file (within the static path) to use as favicon of the
128128
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
129129
# pixels large.
130-
#html_favicon = None
130+
# html_favicon = None
131131

132132
# Add any paths that contain custom static files (such as style sheets) here,
133133
# relative to this directory. They are copied after the builtin static files,
134134
# so a file named "default.css" will overwrite the builtin "default.css".
135-
#html_static_path = ['_static']
135+
# html_static_path = ['_static']
136136

137137
# Add any extra paths that contain custom files (such as robots.txt or
138138
# .htaccess) here, relative to this directory. These files are copied
139139
# directly to the root of the documentation.
140-
#html_extra_path = []
140+
# html_extra_path = []
141141

142142
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
143143
# using the given strftime format.
144-
#html_last_updated_fmt = '%b %d, %Y'
144+
# html_last_updated_fmt = '%b %d, %Y'
145145

146146
# If true, SmartyPants will be used to convert quotes and dashes to
147147
# typographically correct entities.
148-
#html_use_smartypants = True
148+
# html_use_smartypants = True
149149

150150
# Custom sidebar templates, maps document names to template names.
151-
#html_sidebars = {}
151+
# html_sidebars = {}
152152

153153
# Additional templates that should be rendered to pages, maps page names to
154154
# template names.
155-
#html_additional_pages = {}
155+
# html_additional_pages = {}
156156

157157
# If false, no module index is generated.
158-
#html_domain_indices = True
158+
# html_domain_indices = True
159159

160160
# If false, no index is generated.
161-
#html_use_index = True
161+
# html_use_index = True
162162

163163
# If true, the index is split into individual pages for each letter.
164-
#html_split_index = False
164+
# html_split_index = False
165165

166166
# If true, links to the reST sources are added to the pages.
167-
#html_show_sourcelink = True
167+
# html_show_sourcelink = True
168168

169169
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
170-
#html_show_sphinx = True
170+
# html_show_sphinx = True
171171

172172
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
173-
#html_show_copyright = True
173+
# html_show_copyright = True
174174

175175
# If true, an OpenSearch description file will be output, and all pages will
176176
# contain a <link> tag referring to it. The value of this option must be the
177177
# base URL from which the finished HTML is served.
178-
#html_use_opensearch = ''
178+
# html_use_opensearch = ''
179179

180180
# This is the file name suffix for HTML files (e.g. ".xhtml").
181-
#html_file_suffix = None
181+
# html_file_suffix = None
182182

183183
# Output file base name for HTML help builder.
184-
htmlhelp_basename = 'mypydoc'
184+
htmlhelp_basename = "mypydoc"
185185

186186

187187
# -- Options for LaTeX output ---------------------------------------------
188188

189189
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': '',
198196
}
199197

200198
# Grouping the document tree into LaTeX files. List of tuples
201199
# (source start file, target name, title,
202200
# author, documentclass [howto, manual, or own class]).
203201
latex_documents = [
204-
('index', 'Mypy.tex', u'Mypy Documentation',
205-
u'Jukka', 'manual'),
202+
("index", "Mypy.tex", "Mypy Documentation", "Jukka", "manual"),
206203
]
207204

208205
# The name of an image file (relative to this directory) to place at the top of
209206
# the title page.
210-
#latex_logo = None
207+
# latex_logo = None
211208

212209
# For "manual" documents, if this is true, then toplevel headings are parts,
213210
# not chapters.
214-
#latex_use_parts = False
211+
# latex_use_parts = False
215212

216213
# If true, show page references after internal links.
217-
#latex_show_pagerefs = False
214+
# latex_show_pagerefs = False
218215

219216
# If true, show URL addresses after external links.
220-
#latex_show_urls = False
217+
# latex_show_urls = False
221218

222219
# Documents to append as an appendix to all manuals.
223-
#latex_appendices = []
220+
# latex_appendices = []
224221

225222
# If false, no module index is generated.
226-
#latex_domain_indices = True
223+
# latex_domain_indices = True
227224

228225

229226
# -- Options for manual page output ---------------------------------------
230227

231228
# One entry per manual page. List of tuples
232229
# (source start file, name, description, authors, manual section).
233-
man_pages = [
234-
('index', 'mypy', u'Mypy Documentation',
235-
[u'Jukka Lehtosalo'], 1)
236-
]
230+
man_pages = [("index", "mypy", "Mypy Documentation", ["Jukka Lehtosalo"], 1)]
237231

238232
# If true, show URL addresses after external links.
239-
#man_show_urls = False
233+
# man_show_urls = False
240234

241235

242236
# -- Options for Texinfo output -------------------------------------------
@@ -245,43 +239,49 @@
245239
# (source start file, target name, title, author,
246240
# dir menu entry, description, category)
247241
texinfo_documents = [
248-
('index', 'Mypy', u'Mypy Documentation',
249-
u'Jukka', 'Mypy', 'One line description of project.',
250-
'Miscellaneous'),
242+
(
243+
"index",
244+
"Mypy",
245+
"Mypy Documentation",
246+
"Jukka",
247+
"Mypy",
248+
"One line description of project.",
249+
"Miscellaneous",
250+
),
251251
]
252252

253253
# Documents to append as an appendix to all manuals.
254-
#texinfo_appendices = []
254+
# texinfo_appendices = []
255255

256256
# If false, no module index is generated.
257-
#texinfo_domain_indices = True
257+
# texinfo_domain_indices = True
258258

259259
# How to display URL addresses: 'footnote', 'no', or 'inline'.
260-
#texinfo_show_urls = 'footnote'
260+
# texinfo_show_urls = 'footnote'
261261

262262
# If true, do not generate a @detailmenu in the "Top" node's menu.
263-
#texinfo_no_detailmenu = False
263+
# texinfo_no_detailmenu = False
264264

265-
rst_prolog = '.. |...| unicode:: U+2026 .. ellipsis\n'
265+
rst_prolog = ".. |...| unicode:: U+2026 .. ellipsis\n"
266266

267267
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),
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),
274274
}
275275

276276

277277
def setup(app: Sphinx) -> None:
278278
app.add_object_type(
279-
'confval',
280-
'confval',
281-
objname='configuration value',
282-
indextemplate='pair: %s; configuration value',
279+
"confval",
280+
"confval",
281+
objname="configuration value",
282+
indextemplate="pair: %s; configuration value",
283283
doc_field_types=[
284-
Field('type', label='Type', has_arg=False, names=('type',)),
285-
Field('default', label='Default', has_arg=False, names=('default',)),
286-
]
284+
Field("type", label="Type", has_arg=False, names=("type",)),
285+
Field("default", label="Default", has_arg=False, names=("default",)),
286+
],
287287
)

0 commit comments

Comments
 (0)