Skip to content

Commit 749aeee

Browse files
author
Kevin D Smith
committed
Clean up formatting based on flake8
1 parent 221f6e2 commit 749aeee

39 files changed

+3472
-2498
lines changed

doc/source/conf.py

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,43 @@
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
3232
# ones.
33-
extensions = ['sphinx.ext.autodoc',
34-
'sphinx.ext.autosummary',
35-
'sphinx.ext.doctest',
36-
'sphinx.ext.extlinks',
37-
'sphinx.ext.todo',
38-
'numpydoc', # used to parse numpy-style docstrings for autodoc
39-
'IPython.sphinxext.ipython_directive',
40-
'IPython.sphinxext.ipython_console_highlighting',
41-
'sphinx.ext.intersphinx',
42-
'sphinx.ext.coverage',
43-
'sphinx.ext.imgmath',
44-
'sphinx.ext.ifconfig',
45-
]
33+
extensions = [
34+
'sphinx.ext.autodoc',
35+
'sphinx.ext.autosummary',
36+
'sphinx.ext.doctest',
37+
'sphinx.ext.extlinks',
38+
'sphinx.ext.todo',
39+
'numpydoc', # used to parse numpy-style docstrings for autodoc
40+
'IPython.sphinxext.ipython_directive',
41+
'IPython.sphinxext.ipython_console_highlighting',
42+
'sphinx.ext.intersphinx',
43+
'sphinx.ext.coverage',
44+
'sphinx.ext.imgmath',
45+
'sphinx.ext.ifconfig',
46+
]
4647

4748
autosummary_generate = True
4849
numpydoc_show_class_members = False
4950
autodoc_default_flags = ['show-inheritance']
5051
autoclass_content = 'class'
5152

52-
intersphinx_mapping = {'python': ('https://docs.python.org/', None),
53-
'pandas': ('http://pandas.pydata.org/pandas-docs/version/0.19.2/', None),
54-
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
55-
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
56-
'matplotlib': ('http://matplotlib.sourceforge.net/', None)}
53+
intersphinx_mapping = {
54+
'python': ('https://docs.python.org/', None),
55+
'pandas': ('http://pandas.pydata.org/pandas-docs/version/0.19.2/', None),
56+
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
57+
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
58+
'matplotlib': ('http://matplotlib.sourceforge.net/', None)
59+
}
5760

5861
# Add any paths that contain templates here, relative to this directory.
5962
templates_path = ['_templates']
@@ -64,7 +67,7 @@
6467
source_suffix = '.rst'
6568

6669
# The encoding of source files.
67-
#source_encoding = 'utf-8-sig'
70+
# source_encoding = 'utf-8-sig'
6871

6972
# The master toctree document.
7073
master_doc = 'index'
@@ -79,7 +82,7 @@
7982
# built documents.
8083
#
8184

82-
import swat
85+
import swat # noqa: W291
8386

8487
# The short X.Y version.
8588
version = swat.__version__
@@ -95,37 +98,37 @@
9598

9699
# There are two options for replacing |today|: either, you set today to some
97100
# non-false value, then it is used:
98-
#today = ''
101+
# today = ''
99102
# Else, today_fmt is used as the format for a strftime call.
100-
#today_fmt = '%B %d, %Y'
103+
# today_fmt = '%B %d, %Y'
101104

102105
# List of patterns, relative to source directory, that match files and
103106
# directories to ignore when looking for source files.
104107
exclude_patterns = []
105108

106109
# The reST default role (used for this markup: `text`) to use for all
107110
# documents.
108-
#default_role = None
111+
# default_role = None
109112

110113
# If true, '()' will be appended to :func: etc. cross-reference text.
111-
#add_function_parentheses = True
114+
# add_function_parentheses = True
112115

113116
# If true, the current module name will be prepended to all description
114117
# unit titles (such as .. function::).
115-
#add_module_names = True
118+
# add_module_names = True
116119

117120
# If true, sectionauthor and moduleauthor directives will be shown in the
118121
# output. They are ignored by default.
119-
#show_authors = False
122+
# show_authors = False
120123

121124
# The name of the Pygments (syntax highlighting) style to use.
122125
pygments_style = 'sphinx'
123126

124127
# A list of ignored prefixes for module index sorting.
125-
#modindex_common_prefix = []
128+
# modindex_common_prefix = []
126129

127130
# If true, keep warnings as "system message" paragraphs in the built documents.
128-
#keep_warnings = False
131+
# keep_warnings = False
129132

130133
# If true, `todo` and `todoList` produce output, else they produce nothing.
131134
todo_include_todos = False
@@ -135,7 +138,7 @@
135138

136139
# The theme to use for HTML and HTML Help pages. See the documentation for
137140
# a list of builtin themes.
138-
import sphinx_rtd_theme
141+
import sphinx_rtd_theme # noqa: E402
139142

140143
html_theme = 'sphinx_rtd_theme'
141144

@@ -146,26 +149,26 @@
146149
# Theme options are theme-specific and customize the look and feel of a theme
147150
# further. For a list of options available for each theme, see the
148151
# documentation.
149-
#html_theme_options = {}
152+
# html_theme_options = {}
150153

151154
# Add any paths that contain custom themes here, relative to this directory.
152155
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
153156

154157
# The name for this set of Sphinx documents. If None, it defaults to
155158
# "<project> v<release> documentation".
156-
#html_title = None
159+
# html_title = None
157160

158161
# A shorter title for the navigation bar. Default is the same as html_title.
159-
#html_short_title = None
162+
# html_short_title = None
160163

161164
# The name of an image file (relative to this directory) to place at the top
162165
# of the sidebar.
163-
#html_logo = None
166+
# html_logo = None
164167

165168
# The name of an image file (within the static path) to use as favicon of the
166169
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
167170
# pixels large.
168-
#html_favicon = None
171+
# html_favicon = None
169172

170173
# Add any paths that contain custom static files (such as style sheets) here,
171174
# relative to this directory. They are copied after the builtin static files,
@@ -175,122 +178,120 @@
175178
# Add any extra paths that contain custom files (such as robots.txt or
176179
# .htaccess) here, relative to this directory. These files are copied
177180
# directly to the root of the documentation.
178-
#html_extra_path = []
181+
# html_extra_path = []
179182

180183
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
181184
# using the given strftime format.
182-
#html_last_updated_fmt = '%b %d, %Y'
185+
# html_last_updated_fmt = '%b %d, %Y'
183186

184187
# If true, SmartyPants will be used to convert quotes and dashes to
185188
# typographically correct entities.
186-
#html_use_smartypants = True
189+
# html_use_smartypants = True
187190

188191
# Custom sidebar templates, maps document names to template names.
189-
#html_sidebars = {}
192+
# html_sidebars = {}
190193

191194
# Additional templates that should be rendered to pages, maps page names to
192195
# template names.
193-
#html_additional_pages = {}
196+
# html_additional_pages = {}
194197

195198
# If false, no module index is generated.
196-
#html_domain_indices = True
199+
# html_domain_indices = True
197200

198201
# If false, no index is generated.
199-
#html_use_index = True
202+
# html_use_index = True
200203

201204
# If true, the index is split into individual pages for each letter.
202-
#html_split_index = False
205+
# html_split_index = False
203206

204207
# If true, links to the reST sources are added to the pages.
205-
#html_show_sourcelink = True
208+
# html_show_sourcelink = True
206209

207210
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
208-
#html_show_sphinx = True
211+
# html_show_sphinx = True
209212

210213
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
211-
#html_show_copyright = True
214+
# html_show_copyright = True
212215

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

218221
# This is the file name suffix for HTML files (e.g. ".xhtml").
219-
#html_file_suffix = None
222+
# html_file_suffix = None
220223

221224
# Language to be used for generating the HTML full-text search index.
222225
# Sphinx supports the following languages:
223226
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
224227
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
225-
#html_search_language = 'en'
228+
# html_search_language = 'en'
226229

227230
# A dictionary with options for the search language support, empty by default.
228231
# Now only 'ja' uses this config value
229-
#html_search_options = {'type': 'default'}
232+
# html_search_options = {'type': 'default'}
230233

231234
# The name of a javascript file (relative to the configuration directory) that
232235
# implements a search results scorer. If empty, the default will be used.
233-
#html_search_scorer = 'scorer.js'
236+
# html_search_scorer = 'scorer.js'
234237

235238
# Output file base name for HTML help builder.
236239
htmlhelp_basename = 'SWATdoc'
237240

238241
# -- Options for LaTeX output ---------------------------------------------
239242

240243
latex_elements = {
241-
# The paper size ('letterpaper' or 'a4paper').
242-
#'papersize': 'letterpaper',
244+
# The paper size ('letterpaper' or 'a4paper').
245+
# 'papersize': 'letterpaper',
243246

244-
# The font size ('10pt', '11pt' or '12pt').
245-
#'pointsize': '10pt',
247+
# The font size ('10pt', '11pt' or '12pt').
248+
# 'pointsize': '10pt',
246249

247-
# Additional stuff for the LaTeX preamble.
248-
#'preamble': '',
250+
# Additional stuff for the LaTeX preamble.
251+
# 'preamble': '',
249252

250-
# Latex figure (float) alignment
251-
#'figure_align': 'htbp',
253+
# Latex figure (float) alignment
254+
# 'figure_align': 'htbp',
252255
}
253256

254257
# Grouping the document tree into LaTeX files. List of tuples
255258
# (source start file, target name, title,
256259
# author, documentclass [howto, manual, or own class]).
257260
latex_documents = [
258-
(master_doc, 'SWAT.tex', 'SWAT Documentation',
259-
'SAS', 'manual'),
261+
(master_doc, 'SWAT.tex', 'SWAT Documentation', 'SAS', 'manual'),
260262
]
261263

262264
# The name of an image file (relative to this directory) to place at the top of
263265
# the title page.
264-
#latex_logo = None
266+
# latex_logo = None
265267

266268
# For "manual" documents, if this is true, then toplevel headings are parts,
267269
# not chapters.
268-
#latex_use_parts = False
270+
# latex_use_parts = False
269271

270272
# If true, show page references after internal links.
271-
#latex_show_pagerefs = False
273+
# latex_show_pagerefs = False
272274

273275
# If true, show URL addresses after external links.
274-
#latex_show_urls = False
276+
# latex_show_urls = False
275277

276278
# Documents to append as an appendix to all manuals.
277-
#latex_appendices = []
279+
# latex_appendices = []
278280

279281
# If false, no module index is generated.
280-
#latex_domain_indices = True
282+
# latex_domain_indices = True
281283

282284

283285
# -- Options for manual page output ---------------------------------------
284286

285287
# One entry per manual page. List of tuples
286288
# (source start file, name, description, authors, manual section).
287289
man_pages = [
288-
(master_doc, 'swat', 'SWAT Documentation',
289-
[author], 1)
290+
(master_doc, 'swat', 'SWAT Documentation', [author], 1)
290291
]
291292

292293
# If true, show URL addresses after external links.
293-
#man_show_urls = False
294+
# man_show_urls = False
294295

295296

296297
# -- Options for Texinfo output -------------------------------------------
@@ -299,19 +300,19 @@
299300
# (source start file, target name, title, author,
300301
# dir menu entry, description, category)
301302
texinfo_documents = [
302-
(master_doc, 'SWAT', 'SWAT Documentation',
303-
author, 'SWAT', 'One line description of project.',
304-
'Miscellaneous'),
303+
(master_doc, 'SWAT', 'SWAT Documentation',
304+
author, 'SWAT', 'One line description of project.',
305+
'Miscellaneous'),
305306
]
306307

307308
# Documents to append as an appendix to all manuals.
308-
#texinfo_appendices = []
309+
# texinfo_appendices = []
309310

310311
# If false, no module index is generated.
311-
#texinfo_domain_indices = True
312+
# texinfo_domain_indices = True
312313

313314
# How to display URL addresses: 'footnote', 'no', or 'inline'.
314-
#texinfo_show_urls = 'footnote'
315+
# texinfo_show_urls = 'footnote'
315316

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

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def get_file(fname):
5151
'requests',
5252
],
5353
platforms='any',
54-
# python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
5554
classifiers=[
5655
'Development Status :: 5 - Production/Stable',
5756
'Environment :: Console',

swat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
raise RuntimeError('Python 2.7 or newer is required to use this package.')
6767

6868
# C extension
69-
from .clib import InitializeTK, TKVersion
69+
from .clib import InitializeTK, TKVersion # noqa: E402
7070

7171
# Configuration
7272
from . import config # noqa: E402

swat/cas/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,10 @@ def from_reflection(cls, asname, actinfo, connection):
645645
+ '{%s}, kwargs)') % callargs
646646
six.exec_(('''def __init__(_self_, %s):'''
647647
+ ''' CASAction.__init__(_self_, %s)''')
648-
% (sig, funcargs), _globals, _locals)
648+
% (sig, funcargs), _globals, _locals)
649649
six.exec_(('''def __call__(_self_, %s):'''
650650
+ ''' return CASAction.__call__(_self_, %s)''')
651-
% (sig, funcargs), _globals, _locals)
651+
% (sig, funcargs), _globals, _locals)
652652

653653
# Generate documentation
654654
all_params = []

0 commit comments

Comments
 (0)