Skip to content

Commit 97c5ee9

Browse files
KotlinIslandilevkivskyi
authored andcommitted
format files with black/isort
1 parent c898b90 commit 97c5ee9

File tree

275 files changed

+32331
-24207
lines changed

Some content is hidden

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

275 files changed

+32331
-24207
lines changed

conftest.py

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

3-
pytest_plugins = [
4-
'mypy.test.data',
5-
]
3+
pytest_plugins = ["mypy.test.data"]
64

75

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

docs/source/conf.py

Lines changed: 83 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -12,91 +12,91 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
16+
import sys
1717

1818
from sphinx.application import Sphinx
1919
from sphinx.util.docfields import Field
2020

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,108 @@
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]).
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")]
207202

208203
# The name of an image file (relative to this directory) to place at the top of
209204
# the title page.
210-
#latex_logo = None
205+
# latex_logo = None
211206

212207
# For "manual" documents, if this is true, then toplevel headings are parts,
213208
# not chapters.
214-
#latex_use_parts = False
209+
# latex_use_parts = False
215210

216211
# If true, show page references after internal links.
217-
#latex_show_pagerefs = False
212+
# latex_show_pagerefs = False
218213

219214
# If true, show URL addresses after external links.
220-
#latex_show_urls = False
215+
# latex_show_urls = False
221216

222217
# Documents to append as an appendix to all manuals.
223-
#latex_appendices = []
218+
# latex_appendices = []
224219

225220
# If false, no module index is generated.
226-
#latex_domain_indices = True
221+
# latex_domain_indices = True
227222

228223

229224
# -- Options for manual page output ---------------------------------------
230225

231226
# One entry per manual page. List of tuples
232227
# (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)]
237229

238230
# If true, show URL addresses after external links.
239-
#man_show_urls = False
231+
# man_show_urls = False
240232

241233

242234
# -- Options for Texinfo output -------------------------------------------
@@ -245,43 +237,49 @@
245237
# (source start file, target name, title, author,
246238
# dir menu entry, description, category)
247239
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+
)
251249
]
252250

253251
# Documents to append as an appendix to all manuals.
254-
#texinfo_appendices = []
252+
# texinfo_appendices = []
255253

256254
# If false, no module index is generated.
257-
#texinfo_domain_indices = True
255+
# texinfo_domain_indices = True
258256

259257
# How to display URL addresses: 'footnote', 'no', or 'inline'.
260-
#texinfo_show_urls = 'footnote'
258+
# texinfo_show_urls = 'footnote'
261259

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

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

267265
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),
274272
}
275273

276274

277275
def setup(app: Sphinx) -> None:
278276
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",
283281
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+
],
287285
)

0 commit comments

Comments
 (0)