Skip to content

Commit 79982ea

Browse files
committed
fix flake8
1 parent 7eb35a4 commit 79982ea

File tree

7 files changed

+173
-143
lines changed

7 files changed

+173
-143
lines changed

docs/source/conf.py

Lines changed: 65 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
# If extensions (or modules to document with autodoc) are in another directory,
2121
# add these directories to sys.path here. If the directory is relative to the
2222
# documentation root, use os.path.abspath to make it absolute, like shown here.
23-
#sys.path.insert(0, os.path.abspath('.'))
23+
# sys.path.insert(0, os.path.abspath('.'))
2424

2525
# -- General configuration ------------------------------------------------
2626

2727
# If your documentation needs a minimal Sphinx version, state it here.
28-
#needs_sphinx = '1.0'
28+
# needs_sphinx = '1.0'
2929

3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -43,7 +43,7 @@
4343
source_suffix = '.rst'
4444

4545
# The encoding of source files.
46-
#source_encoding = 'utf-8-sig'
46+
# source_encoding = 'utf-8-sig'
4747

4848
# The master toctree document.
4949
master_doc = 'index'
@@ -63,41 +63,41 @@
6363

6464
# The language for content autogenerated by Sphinx. Refer to documentation
6565
# for a list of supported languages.
66-
#language = None
66+
# language = None
6767

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

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

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

8282
# If true, '()' will be appended to :func: etc. cross-reference text.
83-
#add_function_parentheses = True
83+
# add_function_parentheses = True
8484

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

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

9393
# The name of the Pygments (syntax highlighting) style to use.
9494
pygments_style = 'sphinx'
9595

9696
# A list of ignored prefixes for module index sorting.
97-
#modindex_common_prefix = []
97+
# modindex_common_prefix = []
9898

9999
# If true, keep warnings as "system message" paragraphs in the built documents.
100-
#keep_warnings = False
100+
# keep_warnings = False
101101

102102

103103
# -- Options for HTML output ----------------------------------------------
@@ -109,26 +109,26 @@
109109
# Theme options are theme-specific and customize the look and feel of a theme
110110
# further. For a list of options available for each theme, see the
111111
# documentation.
112-
#html_theme_options = {}
112+
# html_theme_options = {}
113113

114114
# Add any paths that contain custom themes here, relative to this directory.
115-
#html_theme_path = []
115+
# html_theme_path = []
116116

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

121121
# A shorter title for the navigation bar. Default is the same as html_title.
122-
#html_short_title = None
122+
# html_short_title = None
123123

124124
# The name of an image file (relative to this directory) to place at the top
125125
# of the sidebar.
126-
#html_logo = None
126+
# html_logo = None
127127

128128
# The name of an image file (within the static path) to use as favicon of the
129129
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
130130
# pixels large.
131-
#html_favicon = None
131+
# html_favicon = None
132132

133133
# Add any paths that contain custom static files (such as style sheets) here,
134134
# relative to this directory. They are copied after the builtin static files,
@@ -138,48 +138,48 @@
138138
# Add any extra paths that contain custom files (such as robots.txt or
139139
# .htaccess) here, relative to this directory. These files are copied
140140
# directly to the root of the documentation.
141-
#html_extra_path = []
141+
# html_extra_path = []
142142

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

147147
# If true, SmartyPants will be used to convert quotes and dashes to
148148
# typographically correct entities.
149-
#html_use_smartypants = True
149+
# html_use_smartypants = True
150150

151151
# Custom sidebar templates, maps document names to template names.
152-
#html_sidebars = {}
152+
# html_sidebars = {}
153153

154154
# Additional templates that should be rendered to pages, maps page names to
155155
# template names.
156-
#html_additional_pages = {}
156+
# html_additional_pages = {}
157157

158158
# If false, no module index is generated.
159-
#html_domain_indices = True
159+
# html_domain_indices = True
160160

161161
# If false, no index is generated.
162-
#html_use_index = True
162+
# html_use_index = True
163163

164164
# If true, the index is split into individual pages for each letter.
165-
#html_split_index = False
165+
# html_split_index = False
166166

167167
# If true, links to the reST sources are added to the pages.
168-
#html_show_sourcelink = True
168+
# html_show_sourcelink = True
169169

170170
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
171-
#html_show_sphinx = True
171+
# html_show_sphinx = True
172172

173173
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
174-
#html_show_copyright = True
174+
# html_show_copyright = True
175175

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

181181
# This is the file name suffix for HTML files (e.g. ".xhtml").
182-
#html_file_suffix = None
182+
# html_file_suffix = None
183183

184184
# Output file base name for HTML help builder.
185185
htmlhelp_basename = 'prioritydoc'
@@ -188,56 +188,58 @@
188188
# -- Options for LaTeX output ---------------------------------------------
189189

190190
latex_elements = {
191-
# The paper size ('letterpaper' or 'a4paper').
192-
#'papersize': 'letterpaper',
193-
194-
# The font size ('10pt', '11pt' or '12pt').
195-
#'pointsize': '10pt',
196-
197-
# Additional stuff for the LaTeX preamble.
198-
#'preamble': '',
191+
# The paper size ('letterpaper' or 'a4paper').
192+
#'papersize': 'letterpaper',
193+
# The font size ('10pt', '11pt' or '12pt').
194+
#'pointsize': '10pt',
195+
# Additional stuff for the LaTeX preamble.
196+
#'preamble': '',
199197
} # type: Dict[str, str]
200198

201199
# Grouping the document tree into LaTeX files. List of tuples
202200
# (source start file, target name, title,
203201
# author, documentclass [howto, manual, or own class]).
204202
latex_documents = [
205-
('index', 'priority.tex', u'priority Documentation',
206-
u'Cory Benfield', 'manual'),
203+
(
204+
'index',
205+
'priority.tex',
206+
u'priority Documentation',
207+
u'Cory Benfield',
208+
'manual',
209+
),
207210
]
208211

209212
# The name of an image file (relative to this directory) to place at the top of
210213
# the title page.
211-
#latex_logo = None
214+
# latex_logo = None
212215

213216
# For "manual" documents, if this is true, then toplevel headings are parts,
214217
# not chapters.
215-
#latex_use_parts = False
218+
# latex_use_parts = False
216219

217220
# If true, show page references after internal links.
218-
#latex_show_pagerefs = False
221+
# latex_show_pagerefs = False
219222

220223
# If true, show URL addresses after external links.
221-
#latex_show_urls = False
224+
# latex_show_urls = False
222225

223226
# Documents to append as an appendix to all manuals.
224-
#latex_appendices = []
227+
# latex_appendices = []
225228

226229
# If false, no module index is generated.
227-
#latex_domain_indices = True
230+
# latex_domain_indices = True
228231

229232

230233
# -- Options for manual page output ---------------------------------------
231234

232235
# One entry per manual page. List of tuples
233236
# (source start file, name, description, authors, manual section).
234237
man_pages = [
235-
('index', 'priority', u'priority Documentation',
236-
[u'Cory Benfield'], 1)
238+
('index', 'priority', u'priority Documentation', [u'Cory Benfield'], 1)
237239
]
238240

239241
# If true, show URL addresses after external links.
240-
#man_show_urls = False
242+
# man_show_urls = False
241243

242244

243245
# -- Options for Texinfo output -------------------------------------------
@@ -246,22 +248,28 @@
246248
# (source start file, target name, title, author,
247249
# dir menu entry, description, category)
248250
texinfo_documents = [
249-
('index', 'priority', u'priority Documentation',
250-
u'Cory Benfield', 'priority', 'One line description of project.',
251-
'Miscellaneous'),
251+
(
252+
'index',
253+
'priority',
254+
u'priority Documentation',
255+
u'Cory Benfield',
256+
'priority',
257+
'One line description of project.',
258+
'Miscellaneous',
259+
),
252260
]
253261

254262
# Documents to append as an appendix to all manuals.
255-
#texinfo_appendices = []
263+
# texinfo_appendices = []
256264

257265
# If false, no module index is generated.
258-
#texinfo_domain_indices = True
266+
# texinfo_domain_indices = True
259267

260268
# How to display URL addresses: 'footnote', 'no', or 'inline'.
261-
#texinfo_show_urls = 'footnote'
269+
# texinfo_show_urls = 'footnote'
262270

263271
# If true, do not generate a @detailmenu in the "Top" node's menu.
264-
#texinfo_no_detailmenu = False
272+
# texinfo_no_detailmenu = False
265273

266274

267275
# Example configuration for intersphinx: refer to the Python standard library.

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
name='priority',
77
version='1.3.0',
88
description='A pure-Python implementation of the HTTP/2 priority tree',
9-
long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(),
9+
long_description=open('README.rst').read()
10+
+ '\n\n'
11+
+ open('HISTORY.rst').read(),
1012
author='Cory Benfield',
1113
author_email='cory@lukasa.co.uk',
1214
url='http://python-hyper.org/priority/',
1315
packages=find_packages(where='src'),
14-
package_data={'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst']},
16+
package_data={
17+
'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst']
18+
},
1519
package_dir={'': 'src'},
1620
include_package_data=True,
1721
license='MIT License',
@@ -31,7 +35,7 @@
3135
'Programming Language :: Python :: Implementation :: PyPy',
3236
],
3337
extras_require={
34-
"mypy": ["mypy>=0.812"],
38+
"mypy": ["mypy>=0.812"],
3539
},
3640
install_requires=["typing >= 3.7.4.3; python_version < '3.5'"],
3741
)

src/priority/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
priority: HTTP/2 priority implementation for Python
44
"""
55
from .priority import ( # noqa
6-
Stream, PriorityTree, DeadlockError, PriorityLoop, DuplicateStreamError,
7-
MissingStreamError, TooManyStreamsError, BadWeightError, PseudoStreamError
6+
Stream,
7+
PriorityTree,
8+
DeadlockError,
9+
PriorityLoop,
10+
DuplicateStreamError,
11+
MissingStreamError,
12+
TooManyStreamsError,
13+
BadWeightError,
14+
PseudoStreamError,
815
)

0 commit comments

Comments
 (0)