Skip to content

Commit ff7b8bc

Browse files
committed
format files with black
1 parent c37ca0f commit ff7b8bc

File tree

266 files changed

+38769
-23014
lines changed

Some content is hidden

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

266 files changed

+38769
-23014
lines changed

conftest.py

Lines changed: 7 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,9 @@ 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",
19+
action="store_true",
20+
default=False,
21+
help="Enable the benchmark test runs",
22+
)

docs/source/conf.py

Lines changed: 85 additions & 85 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'2016, Jukka Lehtosalo'
51+
project = "Mypy"
52+
copyright = "2016, Jukka Lehtosalo"
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 ----------------------------------------------
@@ -106,143 +106,137 @@
106106
try:
107107
import sphinx_rtd_theme
108108
except:
109-
html_theme = 'default'
109+
html_theme = "default"
110110
else:
111-
html_theme = 'sphinx_rtd_theme'
111+
html_theme = "sphinx_rtd_theme"
112112
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
113113

114114
# Theme options are theme-specific and customize the look and feel of a theme
115115
# further. For a list of options available for each theme, see the
116116
# documentation.
117-
#html_theme_options = {}
117+
# html_theme_options = {}
118118

119119
# Add any paths that contain custom themes here, relative to this directory.
120-
#html_theme_path = []
120+
# html_theme_path = []
121121

122122
# The name for this set of Sphinx documents. If None, it defaults to
123123
# "<project> v<release> documentation".
124-
#html_title = None
124+
# html_title = None
125125

126126
# A shorter title for the navigation bar. Default is the same as html_title.
127-
#html_short_title = None
127+
# html_short_title = None
128128

129129
# The name of an image file (relative to this directory) to place at the top
130130
# of the sidebar.
131-
#html_logo = None
131+
# html_logo = None
132132

133133
# The name of an image file (within the static path) to use as favicon of the
134134
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
135135
# pixels large.
136-
#html_favicon = None
136+
# html_favicon = None
137137

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

143143
# Add any extra paths that contain custom files (such as robots.txt or
144144
# .htaccess) here, relative to this directory. These files are copied
145145
# directly to the root of the documentation.
146-
#html_extra_path = []
146+
# html_extra_path = []
147147

148148
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
149149
# using the given strftime format.
150-
#html_last_updated_fmt = '%b %d, %Y'
150+
# html_last_updated_fmt = '%b %d, %Y'
151151

152152
# If true, SmartyPants will be used to convert quotes and dashes to
153153
# typographically correct entities.
154-
#html_use_smartypants = True
154+
# html_use_smartypants = True
155155

156156
# Custom sidebar templates, maps document names to template names.
157-
#html_sidebars = {}
157+
# html_sidebars = {}
158158

159159
# Additional templates that should be rendered to pages, maps page names to
160160
# template names.
161-
#html_additional_pages = {}
161+
# html_additional_pages = {}
162162

163163
# If false, no module index is generated.
164-
#html_domain_indices = True
164+
# html_domain_indices = True
165165

166166
# If false, no index is generated.
167-
#html_use_index = True
167+
# html_use_index = True
168168

169169
# If true, the index is split into individual pages for each letter.
170-
#html_split_index = False
170+
# html_split_index = False
171171

172172
# If true, links to the reST sources are added to the pages.
173-
#html_show_sourcelink = True
173+
# html_show_sourcelink = True
174174

175175
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
176-
#html_show_sphinx = True
176+
# html_show_sphinx = True
177177

178178
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
179-
#html_show_copyright = True
179+
# html_show_copyright = True
180180

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

186186
# This is the file name suffix for HTML files (e.g. ".xhtml").
187-
#html_file_suffix = None
187+
# html_file_suffix = None
188188

189189
# Output file base name for HTML help builder.
190-
htmlhelp_basename = 'Mypydoc'
190+
htmlhelp_basename = "Mypydoc"
191191

192192

193193
# -- Options for LaTeX output ---------------------------------------------
194194

195195
latex_elements = {
196-
# The paper size ('letterpaper' or 'a4paper').
197-
#'papersize': 'letterpaper',
198-
199-
# The font size ('10pt', '11pt' or '12pt').
200-
#'pointsize': '10pt',
201-
202-
# Additional stuff for the LaTeX preamble.
203-
#'preamble': '',
196+
# The paper size ('letterpaper' or 'a4paper').
197+
#'papersize': 'letterpaper',
198+
# The font size ('10pt', '11pt' or '12pt').
199+
#'pointsize': '10pt',
200+
# Additional stuff for the LaTeX preamble.
201+
#'preamble': '',
204202
}
205203

206204
# Grouping the document tree into LaTeX files. List of tuples
207205
# (source start file, target name, title,
208206
# author, documentclass [howto, manual, or own class]).
209207
latex_documents = [
210-
('index', 'Mypy.tex', u'Mypy Documentation',
211-
u'Jukka', 'manual'),
208+
("index", "Mypy.tex", "Mypy Documentation", "Jukka", "manual"),
212209
]
213210

214211
# The name of an image file (relative to this directory) to place at the top of
215212
# the title page.
216-
#latex_logo = None
213+
# latex_logo = None
217214

218215
# For "manual" documents, if this is true, then toplevel headings are parts,
219216
# not chapters.
220-
#latex_use_parts = False
217+
# latex_use_parts = False
221218

222219
# If true, show page references after internal links.
223-
#latex_show_pagerefs = False
220+
# latex_show_pagerefs = False
224221

225222
# If true, show URL addresses after external links.
226-
#latex_show_urls = False
223+
# latex_show_urls = False
227224

228225
# Documents to append as an appendix to all manuals.
229-
#latex_appendices = []
226+
# latex_appendices = []
230227

231228
# If false, no module index is generated.
232-
#latex_domain_indices = True
229+
# latex_domain_indices = True
233230

234231

235232
# -- Options for manual page output ---------------------------------------
236233

237234
# One entry per manual page. List of tuples
238235
# (source start file, name, description, authors, manual section).
239-
man_pages = [
240-
('index', 'mypy', u'Mypy Documentation',
241-
[u'Jukka Lehtosalo'], 1)
242-
]
236+
man_pages = [("index", "mypy", "Mypy Documentation", ["Jukka Lehtosalo"], 1)]
243237

244238
# If true, show URL addresses after external links.
245-
#man_show_urls = False
239+
# man_show_urls = False
246240

247241

248242
# -- Options for Texinfo output -------------------------------------------
@@ -251,43 +245,49 @@
251245
# (source start file, target name, title, author,
252246
# dir menu entry, description, category)
253247
texinfo_documents = [
254-
('index', 'Mypy', u'Mypy Documentation',
255-
u'Jukka', 'Mypy', 'One line description of project.',
256-
'Miscellaneous'),
248+
(
249+
"index",
250+
"Mypy",
251+
"Mypy Documentation",
252+
"Jukka",
253+
"Mypy",
254+
"One line description of project.",
255+
"Miscellaneous",
256+
),
257257
]
258258

259259
# Documents to append as an appendix to all manuals.
260-
#texinfo_appendices = []
260+
# texinfo_appendices = []
261261

262262
# If false, no module index is generated.
263-
#texinfo_domain_indices = True
263+
# texinfo_domain_indices = True
264264

265265
# How to display URL addresses: 'footnote', 'no', or 'inline'.
266-
#texinfo_show_urls = 'footnote'
266+
# texinfo_show_urls = 'footnote'
267267

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

271-
rst_prolog = '.. |...| unicode:: U+2026 .. ellipsis\n'
271+
rst_prolog = ".. |...| unicode:: U+2026 .. ellipsis\n"
272272

273273
intersphinx_mapping = {
274-
'python': ('https://docs.python.org/3', None),
275-
'six': ('https://six.readthedocs.io', None),
276-
'attrs': ('http://www.attrs.org/en/stable', None),
277-
'cython': ('http://docs.cython.org/en/latest', None),
278-
'monkeytype': ('https://monkeytype.readthedocs.io/en/latest', None),
279-
'setuptools': ('https://setuptools.readthedocs.io/en/latest', None),
274+
"python": ("https://docs.python.org/3", None),
275+
"six": ("https://six.readthedocs.io", None),
276+
"attrs": ("http://www.attrs.org/en/stable", None),
277+
"cython": ("http://docs.cython.org/en/latest", None),
278+
"monkeytype": ("https://monkeytype.readthedocs.io/en/latest", None),
279+
"setuptools": ("https://setuptools.readthedocs.io/en/latest", None),
280280
}
281281

282282

283283
def setup(app: Sphinx) -> None:
284284
app.add_object_type(
285-
'confval',
286-
'confval',
287-
objname='configuration value',
288-
indextemplate='pair: %s; configuration value',
285+
"confval",
286+
"confval",
287+
objname="configuration value",
288+
indextemplate="pair: %s; configuration value",
289289
doc_field_types=[
290-
Field('type', label='Type', has_arg=False, names=('type',)),
291-
Field('default', label='Default', has_arg=False, names=('default',)),
292-
]
290+
Field("type", label="Type", has_arg=False, names=("type",)),
291+
Field("default", label="Default", has_arg=False, names=("default",)),
292+
],
293293
)

0 commit comments

Comments
 (0)