Skip to content

Commit af1668b

Browse files
committedApr 18, 2021
extend black formatting to tests as well
1 parent a717475 commit af1668b

Some content is hidden

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

45 files changed

+1649
-1312
lines changed
 

‎.pre-commit-config.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
exclude: ^tests/fixtures/example-code/
1+
exclude: ^tests/fixtures/
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
44
rev: v3.4.0
55
hooks:
66
- id: check-yaml
77
- id: debug-statements
8-
exclude: ^tests/fixtures/example-code/invalid-syntax.py$
98
- id: end-of-file-fixer
109
- id: trailing-whitespace
11-
exclude: ^tests/fixtures/diffs/
1210
- repo: https://github.com/asottile/reorder_python_imports
1311
rev: v2.4.0
1412
hooks:
@@ -18,8 +16,7 @@ repos:
1816
rev: 20.8b1
1917
hooks:
2018
- id: black
21-
args: [--line-length=78]
22-
files: ^src/
19+
args: [--line-length=79]
2320
- repo: https://github.com/asottile/pyupgrade
2421
rev: v2.12.0
2522
hooks:
@@ -29,4 +26,4 @@ repos:
2926
rev: v0.812
3027
hooks:
3128
- id: mypy
32-
exclude: ^(docs/|example-plugin/|tests/fixtures)
29+
exclude: ^(docs/|example-plugin/)

‎docs/source/conf.py

+87-80
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,45 @@
1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#sys.path.insert(0, os.path.abspath('.'))
19+
# sys.path.insert(0, os.path.abspath('.'))
2020

2121
# -- General configuration ------------------------------------------------
2222

2323
# If your documentation needs a minimal Sphinx version, state it here.
24-
needs_sphinx = '1.3'
24+
needs_sphinx = "1.3"
2525

2626
# Add any Sphinx extension module names here, as strings. They can be
2727
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2828
# ones.
2929
extensions = [
30-
'sphinx.ext.autodoc',
31-
'sphinx.ext.doctest',
32-
'sphinx.ext.extlinks',
33-
'sphinx.ext.intersphinx',
34-
'sphinx.ext.todo',
35-
'sphinx.ext.coverage',
36-
'sphinx.ext.viewcode',
37-
'sphinx-prompt',
30+
"sphinx.ext.autodoc",
31+
"sphinx.ext.doctest",
32+
"sphinx.ext.extlinks",
33+
"sphinx.ext.intersphinx",
34+
"sphinx.ext.todo",
35+
"sphinx.ext.coverage",
36+
"sphinx.ext.viewcode",
37+
"sphinx-prompt",
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 = 'flake8'
56-
copyright = '2016, Ian Stapleton Cordasco'
57-
author = 'Ian Stapleton Cordasco'
55+
project = "flake8"
56+
copyright = "2016, Ian Stapleton Cordasco"
57+
author = "Ian Stapleton Cordasco"
5858

5959
import flake8
6060

@@ -80,37 +80,37 @@
8080

8181
# There are two options for replacing |today|: either, you set today to some
8282
# non-false value, then it is used:
83-
#today = ''
83+
# today = ''
8484
# Else, today_fmt is used as the format for a strftime call.
85-
#today_fmt = '%B %d, %Y'
85+
# today_fmt = '%B %d, %Y'
8686

8787
# List of patterns, relative to source directory, that match files and
8888
# directories to ignore when looking for source files.
8989
exclude_patterns = []
9090

9191
# The reST default role (used for this markup: `text`) to use for all
9292
# documents.
93-
#default_role = None
93+
# default_role = None
9494

9595
# If true, '()' will be appended to :func: etc. cross-reference text.
96-
#add_function_parentheses = True
96+
# add_function_parentheses = True
9797

9898
# If true, the current module name will be prepended to all description
9999
# unit titles (such as .. function::).
100-
#add_module_names = True
100+
# add_module_names = True
101101

102102
# If true, sectionauthor and moduleauthor directives will be shown in the
103103
# output. They are ignored by default.
104-
#show_authors = False
104+
# show_authors = False
105105

106106
# The name of the Pygments (syntax highlighting) style to use.
107-
pygments_style = 'sphinx'
107+
pygments_style = "sphinx"
108108

109109
# A list of ignored prefixes for module index sorting.
110-
#modindex_common_prefix = []
110+
# modindex_common_prefix = []
111111

112112
# If true, keep warnings as "system message" paragraphs in the built documents.
113-
#keep_warnings = False
113+
# keep_warnings = False
114114

115115
# If true, `todo` and `todoList` produce output, else they produce nothing.
116116
todo_include_todos = True
@@ -120,31 +120,31 @@
120120

121121
# The theme to use for HTML and HTML Help pages. See the documentation for
122122
# a list of builtin themes.
123-
html_theme = 'sphinx_rtd_theme'
123+
html_theme = "sphinx_rtd_theme"
124124

125125
# Theme options are theme-specific and customize the look and feel of a theme
126126
# further. For a list of options available for each theme, see the
127127
# documentation.
128-
#html_theme_options = {}
128+
# html_theme_options = {}
129129

130130
# Add any paths that contain custom themes here, relative to this directory.
131-
#html_theme_path = []
131+
# html_theme_path = []
132132

133133
# The name for this set of Sphinx documents. If None, it defaults to
134134
# "<project> v<release> documentation".
135-
#html_title = None
135+
# html_title = None
136136

137137
# A shorter title for the navigation bar. Default is the same as html_title.
138-
#html_short_title = None
138+
# html_short_title = None
139139

140140
# The name of an image file (relative to this directory) to place at the top
141141
# of the sidebar.
142-
#html_logo = None
142+
# html_logo = None
143143

144144
# The name of an image file (within the static path) to use as favicon of the
145145
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
146146
# pixels large.
147-
#html_favicon = None
147+
# html_favicon = None
148148

149149
# Add any paths that contain custom static files (such as style sheets) here,
150150
# relative to this directory. They are copied after the builtin static files,
@@ -154,122 +154,123 @@
154154
# Add any extra paths that contain custom files (such as robots.txt or
155155
# .htaccess) here, relative to this directory. These files are copied
156156
# directly to the root of the documentation.
157-
#html_extra_path = []
157+
# html_extra_path = []
158158

159159
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
160160
# using the given strftime format.
161-
#html_last_updated_fmt = '%b %d, %Y'
161+
# html_last_updated_fmt = '%b %d, %Y'
162162

163163
# If true, SmartyPants will be used to convert quotes and dashes to
164164
# typographically correct entities.
165-
#html_use_smartypants = True
165+
# html_use_smartypants = True
166166

167167
# Custom sidebar templates, maps document names to template names.
168-
#html_sidebars = {}
168+
# html_sidebars = {}
169169

170170
# Additional templates that should be rendered to pages, maps page names to
171171
# template names.
172-
#html_additional_pages = {}
172+
# html_additional_pages = {}
173173

174174
# If false, no module index is generated.
175-
#html_domain_indices = True
175+
# html_domain_indices = True
176176

177177
# If false, no index is generated.
178-
#html_use_index = True
178+
# html_use_index = True
179179

180180
# If true, the index is split into individual pages for each letter.
181-
#html_split_index = False
181+
# html_split_index = False
182182

183183
# If true, links to the reST sources are added to the pages.
184-
#html_show_sourcelink = True
184+
# html_show_sourcelink = True
185185

186186
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
187-
#html_show_sphinx = True
187+
# html_show_sphinx = True
188188

189189
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
190-
#html_show_copyright = True
190+
# html_show_copyright = True
191191

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

197197
# This is the file name suffix for HTML files (e.g. ".xhtml").
198-
#html_file_suffix = None
198+
# html_file_suffix = None
199199

200200
# Language to be used for generating the HTML full-text search index.
201201
# Sphinx supports the following languages:
202202
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
203203
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
204-
#html_search_language = 'en'
204+
# html_search_language = 'en'
205205

206206
# A dictionary with options for the search language support, empty by default.
207207
# Now only 'ja' uses this config value
208-
#html_search_options = {'type': 'default'}
208+
# html_search_options = {'type': 'default'}
209209

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

214214
# Output file base name for HTML help builder.
215-
htmlhelp_basename = 'flake8doc'
215+
htmlhelp_basename = "flake8doc"
216216

217217
# -- Options for LaTeX output ---------------------------------------------
218218

219219
latex_elements = {
220-
# The paper size ('letterpaper' or 'a4paper').
221-
#'papersize': 'letterpaper',
222-
223-
# The font size ('10pt', '11pt' or '12pt').
224-
#'pointsize': '10pt',
225-
226-
# Additional stuff for the LaTeX preamble.
227-
#'preamble': '',
228-
229-
# Latex figure (float) alignment
230-
#'figure_align': 'htbp',
220+
# The paper size ('letterpaper' or 'a4paper').
221+
#'papersize': 'letterpaper',
222+
# The font size ('10pt', '11pt' or '12pt').
223+
#'pointsize': '10pt',
224+
# Additional stuff for the LaTeX preamble.
225+
#'preamble': '',
226+
# Latex figure (float) alignment
227+
#'figure_align': 'htbp',
231228
}
232229

233230
# Grouping the document tree into LaTeX files. List of tuples
234231
# (source start file, target name, title,
235232
# author, documentclass [howto, manual, or own class]).
236233
latex_documents = [
237-
(master_doc, 'flake8.tex', 'flake8 Documentation',
238-
'Ian Stapleton Cordasco', 'manual'),
234+
(
235+
master_doc,
236+
"flake8.tex",
237+
"flake8 Documentation",
238+
"Ian Stapleton Cordasco",
239+
"manual",
240+
),
239241
]
240242

241243
# The name of an image file (relative to this directory) to place at the top of
242244
# the title page.
243-
#latex_logo = None
245+
# latex_logo = None
244246

245247
# For "manual" documents, if this is true, then toplevel headings are parts,
246248
# not chapters.
247-
#latex_use_parts = False
249+
# latex_use_parts = False
248250

249251
# If true, show page references after internal links.
250-
#latex_show_pagerefs = False
252+
# latex_show_pagerefs = False
251253

252254
# If true, show URL addresses after external links.
253-
#latex_show_urls = False
255+
# latex_show_urls = False
254256

255257
# Documents to append as an appendix to all manuals.
256-
#latex_appendices = []
258+
# latex_appendices = []
257259

258260
# If false, no module index is generated.
259-
#latex_domain_indices = True
261+
# latex_domain_indices = True
260262

261263

262264
# -- Options for manual page output ---------------------------------------
263265

264266
# One entry per manual page. List of tuples
265267
# (source start file, name, description, authors, manual section).
266268
man_pages = [
267-
('manpage', 'flake8', 'Flake8 Command Line Documentation',
268-
[author], 1)
269+
("manpage", "flake8", "Flake8 Command Line Documentation", [author], 1)
269270
]
270271

271272
# If true, show URL addresses after external links.
272-
#man_show_urls = False
273+
# man_show_urls = False
273274

274275

275276
# -- Options for Texinfo output -------------------------------------------
@@ -278,26 +279,32 @@
278279
# (source start file, target name, title, author,
279280
# dir menu entry, description, category)
280281
texinfo_documents = [
281-
('index', 'Flake8', 'Flake8 Documentation', 'Tarek Ziade',
282-
'Flake8', 'Code checking using pycodestyle, pyflakes and mccabe',
283-
'Miscellaneous'),
282+
(
283+
"index",
284+
"Flake8",
285+
"Flake8 Documentation",
286+
"Tarek Ziade",
287+
"Flake8",
288+
"Code checking using pycodestyle, pyflakes and mccabe",
289+
"Miscellaneous",
290+
),
284291
]
285292

286293
# Documents to append as an appendix to all manuals.
287-
#texinfo_appendices = []
294+
# texinfo_appendices = []
288295

289296
# If false, no module index is generated.
290-
#texinfo_domain_indices = True
297+
# texinfo_domain_indices = True
291298

292299
# How to display URL addresses: 'footnote', 'no', or 'inline'.
293-
#texinfo_show_urls = 'footnote'
300+
# texinfo_show_urls = 'footnote'
294301

295302
# If true, do not generate a @detailmenu in the "Top" node's menu.
296-
#texinfo_no_detailmenu = False
303+
# texinfo_no_detailmenu = False
297304

298305

299306
# Example configuration for intersphinx: refer to the Python standard library.
300-
intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)}
307+
intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
301308

302309
extlinks = {
303310
"issue": ("https://github.com/pycqa/flake8/issues/%s", "#"),

0 commit comments

Comments
 (0)
Please sign in to comment.