Skip to content

Commit 67f1ddd

Browse files
author
Daniel Gallagher
committed
Run black formatter via pre-commit on all files
1 parent 1754771 commit 67f1ddd

Some content is hidden

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

61 files changed

+743
-771
lines changed

conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,32 @@
44

55
try:
66
import pyannotate_runtime
7+
78
PYANOTATE_PRESENT = True
89
except ImportError:
910
PYANOTATE_PRESENT = False
1011

1112
if PYANOTATE_PRESENT:
13+
1214
def pytest_collection_finish(session):
1315
"""Handle the pytest collection finish hook: configure pyannotate.
1416
Explicitly delay importing `collect_types` until all tests have
1517
been collected. This gives gevent a chance to monkey patch the
1618
world before importing pyannotate.
1719
"""
1820
from pyannotate_runtime import collect_types
21+
1922
collect_types.init_types_collection()
2023

2124
@pytest.fixture(autouse=True)
2225
def collect_types_fixture():
2326
from pyannotate_runtime import collect_types
27+
2428
collect_types.resume()
2529
yield
2630
collect_types.pause()
2731

2832
def pytest_sessionfinish(session, exitstatus):
2933
from pyannotate_runtime import collect_types
34+
3035
collect_types.dump_stats("type_info.json")

docs/conf.py

Lines changed: 82 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,51 @@
1919
# If extensions (or modules to document with autodoc) are in another directory,
2020
# add these directories to sys.path here. If the directory is relative to the
2121
# documentation root, use os.path.abspath to make it absolute, like shown here.
22-
sys.path.insert(0, os.path.abspath('..'))
22+
sys.path.insert(0, os.path.abspath(".."))
2323

2424
# -- General configuration ------------------------------------------------
2525

2626
# If your documentation needs a minimal Sphinx version, state it here.
27-
#needs_sphinx = '1.0'
27+
# needs_sphinx = '1.0'
2828

2929
# Add any Sphinx extension module names here, as strings. They can be
3030
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3131
# ones.
3232
extensions = [
33-
'sphinx.ext.autodoc',
34-
'sphinx.ext.intersphinx',
35-
'sphinx.ext.todo',
36-
'sphinx.ext.coverage',
37-
'sphinx.ext.viewcode',
33+
"sphinx.ext.autodoc",
34+
"sphinx.ext.intersphinx",
35+
"sphinx.ext.todo",
36+
"sphinx.ext.coverage",
37+
"sphinx.ext.viewcode",
3838
]
3939

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

4343
# The suffix(es) of source filenames.
4444
# You can specify multiple suffix as a list of string:
4545
# source_suffix = ['.rst', '.md']
46-
source_suffix = '.rst'
46+
source_suffix = ".rst"
4747

4848
# The encoding of source files.
49-
#source_encoding = 'utf-8-sig'
49+
# source_encoding = 'utf-8-sig'
5050

5151
# The master toctree document.
52-
master_doc = 'index'
52+
master_doc = "index"
5353

5454
# General information about the project.
55-
project = u'graphqllib'
56-
copyright = u'2015, Taeho Kim'
57-
author = u'Taeho Kim'
55+
project = u"graphqllib"
56+
copyright = u"2015, Taeho Kim"
57+
author = u"Taeho Kim"
5858

5959
# The version info for the project you're documenting, acts as replacement for
6060
# |version| and |release|, also used in various other places throughout the
6161
# built documents.
6262
#
6363
# The short X.Y version.
64-
version = '0.1'
64+
version = "0.1"
6565
# The full version, including alpha/beta/rc tags.
66-
release = '0.1a0'
66+
release = "0.1a0"
6767

6868
# The language for content autogenerated by Sphinx. Refer to documentation
6969
# for a list of supported languages.
@@ -74,37 +74,37 @@
7474

7575
# There are two options for replacing |today|: either, you set today to some
7676
# non-false value, then it is used:
77-
#today = ''
77+
# today = ''
7878
# Else, today_fmt is used as the format for a strftime call.
79-
#today_fmt = '%B %d, %Y'
79+
# today_fmt = '%B %d, %Y'
8080

8181
# List of patterns, relative to source directory, that match files and
8282
# directories to ignore when looking for source files.
83-
exclude_patterns = ['_build']
83+
exclude_patterns = ["_build"]
8484

8585
# The reST default role (used for this markup: `text`) to use for all
8686
# documents.
87-
#default_role = None
87+
# default_role = None
8888

8989
# If true, '()' will be appended to :func: etc. cross-reference text.
90-
#add_function_parentheses = True
90+
# add_function_parentheses = True
9191

9292
# If true, the current module name will be prepended to all description
9393
# unit titles (such as .. function::).
94-
#add_module_names = True
94+
# add_module_names = True
9595

9696
# If true, sectionauthor and moduleauthor directives will be shown in the
9797
# output. They are ignored by default.
98-
#show_authors = False
98+
# show_authors = False
9999

100100
# The name of the Pygments (syntax highlighting) style to use.
101-
pygments_style = 'sphinx'
101+
pygments_style = "sphinx"
102102

103103
# A list of ignored prefixes for module index sorting.
104-
#modindex_common_prefix = []
104+
# modindex_common_prefix = []
105105

106106
# If true, keep warnings as "system message" paragraphs in the built documents.
107-
#keep_warnings = False
107+
# keep_warnings = False
108108

109109
# If true, `todo` and `todoList` produce output, else they produce nothing.
110110
todo_include_todos = True
@@ -114,156 +114,149 @@
114114

115115
# The theme to use for HTML and HTML Help pages. See the documentation for
116116
# a list of builtin themes.
117-
html_theme = 'alabaster'
117+
html_theme = "alabaster"
118118

119119
# Theme options are theme-specific and customize the look and feel of a theme
120120
# further. For a list of options available for each theme, see the
121121
# documentation.
122-
#html_theme_options = {}
122+
# html_theme_options = {}
123123

124124
# Add any paths that contain custom themes here, relative to this directory.
125-
#html_theme_path = []
125+
# html_theme_path = []
126126

127127
# The name for this set of Sphinx documents. If None, it defaults to
128128
# "<project> v<release> documentation".
129-
#html_title = None
129+
# html_title = None
130130

131131
# A shorter title for the navigation bar. Default is the same as html_title.
132-
#html_short_title = None
132+
# html_short_title = None
133133

134134
# The name of an image file (relative to this directory) to place at the top
135135
# of the sidebar.
136-
#html_logo = None
136+
# html_logo = None
137137

138138
# The name of an image file (within the static path) to use as favicon of the
139139
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
140140
# pixels large.
141-
#html_favicon = None
141+
# html_favicon = None
142142

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

148148
# Add any extra paths that contain custom files (such as robots.txt or
149149
# .htaccess) here, relative to this directory. These files are copied
150150
# directly to the root of the documentation.
151-
#html_extra_path = []
151+
# html_extra_path = []
152152

153153
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
154154
# using the given strftime format.
155-
#html_last_updated_fmt = '%b %d, %Y'
155+
# html_last_updated_fmt = '%b %d, %Y'
156156

157157
# If true, SmartyPants will be used to convert quotes and dashes to
158158
# typographically correct entities.
159-
#html_use_smartypants = True
159+
# html_use_smartypants = True
160160

161161
# Custom sidebar templates, maps document names to template names.
162-
#html_sidebars = {}
162+
# html_sidebars = {}
163163

164164
# Additional templates that should be rendered to pages, maps page names to
165165
# template names.
166-
#html_additional_pages = {}
166+
# html_additional_pages = {}
167167

168168
# If false, no module index is generated.
169-
#html_domain_indices = True
169+
# html_domain_indices = True
170170

171171
# If false, no index is generated.
172-
#html_use_index = True
172+
# html_use_index = True
173173

174174
# If true, the index is split into individual pages for each letter.
175-
#html_split_index = False
175+
# html_split_index = False
176176

177177
# If true, links to the reST sources are added to the pages.
178-
#html_show_sourcelink = True
178+
# html_show_sourcelink = True
179179

180180
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
181-
#html_show_sphinx = True
181+
# html_show_sphinx = True
182182

183183
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
184-
#html_show_copyright = True
184+
# html_show_copyright = True
185185

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

191191
# This is the file name suffix for HTML files (e.g. ".xhtml").
192-
#html_file_suffix = None
192+
# html_file_suffix = None
193193

194194
# Language to be used for generating the HTML full-text search index.
195195
# Sphinx supports the following languages:
196196
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
197197
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
198-
#html_search_language = 'en'
198+
# html_search_language = 'en'
199199

200200
# A dictionary with options for the search language support, empty by default.
201201
# Now only 'ja' uses this config value
202-
#html_search_options = {'type': 'default'}
202+
# html_search_options = {'type': 'default'}
203203

204204
# The name of a javascript file (relative to the configuration directory) that
205205
# implements a search results scorer. If empty, the default will be used.
206-
#html_search_scorer = 'scorer.js'
206+
# html_search_scorer = 'scorer.js'
207207

208208
# Output file base name for HTML help builder.
209-
htmlhelp_basename = 'graphqllibdoc'
209+
htmlhelp_basename = "graphqllibdoc"
210210

211211
# -- Options for LaTeX output ---------------------------------------------
212212

213213
latex_elements = {
214-
# The paper size ('letterpaper' or 'a4paper').
215-
#'papersize': 'letterpaper',
216-
217-
# The font size ('10pt', '11pt' or '12pt').
218-
#'pointsize': '10pt',
219-
220-
# Additional stuff for the LaTeX preamble.
221-
#'preamble': '',
222-
223-
# Latex figure (float) alignment
224-
#'figure_align': 'htbp',
214+
# The paper size ('letterpaper' or 'a4paper').
215+
# 'papersize': 'letterpaper',
216+
# The font size ('10pt', '11pt' or '12pt').
217+
# 'pointsize': '10pt',
218+
# Additional stuff for the LaTeX preamble.
219+
# 'preamble': '',
220+
# Latex figure (float) alignment
221+
# 'figure_align': 'htbp',
225222
}
226223

227224
# Grouping the document tree into LaTeX files. List of tuples
228225
# (source start file, target name, title,
229226
# author, documentclass [howto, manual, or own class]).
230227
latex_documents = [
231-
(master_doc, 'graphqllib.tex', u'graphqllib Documentation',
232-
u'Taeho Kim', 'manual'),
228+
(master_doc, "graphqllib.tex", u"graphqllib Documentation", u"Taeho Kim", "manual")
233229
]
234230

235231
# The name of an image file (relative to this directory) to place at the top of
236232
# the title page.
237-
#latex_logo = None
233+
# latex_logo = None
238234

239235
# For "manual" documents, if this is true, then toplevel headings are parts,
240236
# not chapters.
241-
#latex_use_parts = False
237+
# latex_use_parts = False
242238

243239
# If true, show page references after internal links.
244-
#latex_show_pagerefs = False
240+
# latex_show_pagerefs = False
245241

246242
# If true, show URL addresses after external links.
247-
#latex_show_urls = False
243+
# latex_show_urls = False
248244

249245
# Documents to append as an appendix to all manuals.
250-
#latex_appendices = []
246+
# latex_appendices = []
251247

252248
# If false, no module index is generated.
253-
#latex_domain_indices = True
249+
# latex_domain_indices = True
254250

255251

256252
# -- Options for manual page output ---------------------------------------
257253

258254
# One entry per manual page. List of tuples
259255
# (source start file, name, description, authors, manual section).
260-
man_pages = [
261-
(master_doc, 'graphqllib', u'graphqllib Documentation',
262-
[author], 1)
263-
]
256+
man_pages = [(master_doc, "graphqllib", u"graphqllib Documentation", [author], 1)]
264257

265258
# If true, show URL addresses after external links.
266-
#man_show_urls = False
259+
# man_show_urls = False
267260

268261

269262
# -- Options for Texinfo output -------------------------------------------
@@ -272,23 +265,29 @@
272265
# (source start file, target name, title, author,
273266
# dir menu entry, description, category)
274267
texinfo_documents = [
275-
(master_doc, 'graphqllib', u'graphqllib Documentation',
276-
author, 'graphqllib', 'One line description of project.',
277-
'Miscellaneous'),
268+
(
269+
master_doc,
270+
"graphqllib",
271+
u"graphqllib Documentation",
272+
author,
273+
"graphqllib",
274+
"One line description of project.",
275+
"Miscellaneous",
276+
)
278277
]
279278

280279
# Documents to append as an appendix to all manuals.
281-
#texinfo_appendices = []
280+
# texinfo_appendices = []
282281

283282
# If false, no module index is generated.
284-
#texinfo_domain_indices = True
283+
# texinfo_domain_indices = True
285284

286285
# How to display URL addresses: 'footnote', 'no', or 'inline'.
287-
#texinfo_show_urls = 'footnote'
286+
# texinfo_show_urls = 'footnote'
288287

289288
# If true, do not generate a @detailmenu in the "Top" node's menu.
290-
#texinfo_no_detailmenu = False
289+
# texinfo_no_detailmenu = False
291290

292291

293292
# Example configuration for intersphinx: refer to the Python standard library.
294-
intersphinx_mapping = {'https://docs.python.org/': None}
293+
intersphinx_mapping = {"https://docs.python.org/": None}

0 commit comments

Comments
 (0)