Skip to content

Commit 9b9ffb5

Browse files
brianjmillerZach Lowry
authored andcommitted
Further PEP8 support
1 parent 89199d6 commit 9b9ffb5

22 files changed

Lines changed: 111 additions & 102 deletions

docs/source/conf.py

Lines changed: 52 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@
2222

2323
# -- General configuration ------------------------------------------------
2424

25+
2526
# Ensure that the __init__ method gets documented.
2627
def skip(app, what, name, obj, skip, options):
2728
if name == "__init__":
2829
return False
2930
return skip
3031

32+
3133
def setup(app):
3234
app.connect("autodoc-skip-member", skip)
3335

3436
# If your documentation needs a minimal Sphinx version, state it here.
35-
#needs_sphinx = '1.0'
37+
# #needs_sphinx = '1.0'
3638

3739
# Add any Sphinx extension module names here, as strings. They can be
3840
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -48,7 +50,7 @@ def setup(app):
4850
source_suffix = '.rst'
4951

5052
# The encoding of source files.
51-
#source_encoding = 'utf-8-sig'
53+
# #source_encoding = 'utf-8-sig'
5254

5355
# The master toctree document.
5456
master_doc = 'index'
@@ -68,41 +70,41 @@ def setup(app):
6870

6971
# The language for content autogenerated by Sphinx. Refer to documentation
7072
# for a list of supported languages.
71-
#language = None
73+
# #language = None
7274

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

7981
# List of patterns, relative to source directory, that match files and
8082
# directories to ignore when looking for source files.
8183
exclude_patterns = []
8284

8385
# The reST default role (used for this markup: `text`) to use for all
8486
# documents.
85-
#default_role = None
87+
# #default_role = None
8688

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

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

9496
# If true, sectionauthor and moduleauthor directives will be shown in the
9597
# output. They are ignored by default.
96-
#show_authors = False
98+
# #show_authors = False
9799

98100
# The name of the Pygments (syntax highlighting) style to use.
99101
pygments_style = 'sphinx'
100102

101103
# A list of ignored prefixes for module index sorting.
102-
#modindex_common_prefix = []
104+
# #modindex_common_prefix = []
103105

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

107109

108110
# -- Options for HTML output ----------------------------------------------
@@ -114,26 +116,26 @@ def setup(app):
114116
# Theme options are theme-specific and customize the look and feel of a theme
115117
# further. For a list of options available for each theme, see the
116118
# documentation.
117-
#html_theme_options = {}
119+
# #html_theme_options = {}
118120

119121
# Add any paths that contain custom themes here, relative to this directory.
120-
#html_theme_path = []
122+
# #html_theme_path = []
121123

122124
# The name for this set of Sphinx documents. If None, it defaults to
123125
# "<project> v<release> documentation".
124-
#html_title = None
126+
# #html_title = None
125127

126128
# A shorter title for the navigation bar. Default is the same as html_title.
127-
#html_short_title = None
129+
# #html_short_title = None
128130

129131
# The name of an image file (relative to this directory) to place at the top
130132
# of the sidebar.
131-
#html_logo = None
133+
# #html_logo = None
132134

133135
# The name of an image file (within the static path) to use as favicon of the
134136
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
135137
# pixels large.
136-
#html_favicon = None
138+
# #html_favicon = None
137139

138140
# Add any paths that contain custom static files (such as style sheets) here,
139141
# relative to this directory. They are copied after the builtin static files,
@@ -143,93 +145,92 @@ def setup(app):
143145
# Add any extra paths that contain custom files (such as robots.txt or
144146
# .htaccess) here, relative to this directory. These files are copied
145147
# directly to the root of the documentation.
146-
#html_extra_path = []
148+
# #html_extra_path = []
147149

148150
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
149151
# using the given strftime format.
150-
#html_last_updated_fmt = '%b %d, %Y'
152+
# #html_last_updated_fmt = '%b %d, %Y'
151153

152154
# If true, SmartyPants will be used to convert quotes and dashes to
153155
# typographically correct entities.
154-
#html_use_smartypants = True
156+
# #html_use_smartypants = True
155157

156158
# Custom sidebar templates, maps document names to template names.
157-
#html_sidebars = {}
159+
# #html_sidebars = {}
158160

159161
# Additional templates that should be rendered to pages, maps page names to
160162
# template names.
161-
#html_additional_pages = {}
163+
# #html_additional_pages = {}
162164

163165
# If false, no module index is generated.
164-
#html_domain_indices = True
166+
# #html_domain_indices = True
165167

166168
# If false, no index is generated.
167-
#html_use_index = True
169+
# #html_use_index = True
168170

169171
# If true, the index is split into individual pages for each letter.
170-
#html_split_index = False
172+
# #html_split_index = False
171173

172174
# If true, links to the reST sources are added to the pages.
173-
#html_show_sourcelink = True
175+
# #html_show_sourcelink = True
174176

175177
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
176-
#html_show_sphinx = True
178+
# #html_show_sphinx = True
177179

178180
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
179-
#html_show_copyright = True
181+
# #html_show_copyright = True
180182

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

186188
# This is the file name suffix for HTML files (e.g. ".xhtml").
187-
#html_file_suffix = None
189+
# #html_file_suffix = None
188190

189191
# Output file base name for HTML help builder.
190192
htmlhelp_basename = 'TinCanPythondoc'
191193

192194

193195
# -- Options for LaTeX output ---------------------------------------------
194196

195-
latex_elements = {
196197
# The paper size ('letterpaper' or 'a4paper').
197-
#'papersize': 'letterpaper',
198+
# #'papersize': 'letterpaper',
198199

199200
# The font size ('10pt', '11pt' or '12pt').
200-
#'pointsize': '10pt',
201+
# #'pointsize': '10pt',
201202

202203
# Additional stuff for the LaTeX preamble.
203-
#'preamble': '',
204-
}
204+
# #'preamble': '',
205+
latex_elements = {}
205206

206207
# Grouping the document tree into LaTeX files. List of tuples
207208
# (source start file, target name, title,
208209
# author, documentclass [howto, manual, or own class]).
209210
latex_documents = [
210-
('index', 'TinCanPython.tex', u'Tin Can Python Documentation',
211-
u'Rustici Software', 'manual'),
211+
('index', 'TinCanPython.tex', u'Tin Can Python Documentation',
212+
u'Rustici Software', 'manual'),
212213
]
213214

214215
# The name of an image file (relative to this directory) to place at the top of
215216
# the title page.
216-
#latex_logo = None
217+
# #latex_logo = None
217218

218219
# For "manual" documents, if this is true, then toplevel headings are parts,
219220
# not chapters.
220-
#latex_use_parts = False
221+
# #latex_use_parts = False
221222

222223
# If true, show page references after internal links.
223-
#latex_show_pagerefs = False
224+
# #latex_show_pagerefs = False
224225

225226
# If true, show URL addresses after external links.
226-
#latex_show_urls = False
227+
# #latex_show_urls = False
227228

228229
# Documents to append as an appendix to all manuals.
229-
#latex_appendices = []
230+
# #latex_appendices = []
230231

231232
# If false, no module index is generated.
232-
#latex_domain_indices = True
233+
# #latex_domain_indices = True
233234

234235

235236
# -- Options for manual page output ---------------------------------------
@@ -242,7 +243,7 @@ def setup(app):
242243
]
243244

244245
# If true, show URL addresses after external links.
245-
#man_show_urls = False
246+
# #man_show_urls = False
246247

247248

248249
# -- Options for Texinfo output -------------------------------------------
@@ -251,19 +252,19 @@ def setup(app):
251252
# (source start file, target name, title, author,
252253
# dir menu entry, description, category)
253254
texinfo_documents = [
254-
('index', 'TinCanPython', u'Tin Can Python Documentation',
255-
u'Rustici Software', 'TinCanPython', 'One line description of project.',
256-
'Miscellaneous'),
255+
('index', 'TinCanPython', u'Tin Can Python Documentation',
256+
u'Rustici Software', 'TinCanPython',
257+
'One line description of project.', 'Miscellaneous'),
257258
]
258259

259260
# Documents to append as an appendix to all manuals.
260-
#texinfo_appendices = []
261+
# #texinfo_appendices = []
261262

262263
# If false, no module index is generated.
263-
#texinfo_domain_indices = True
264+
# #texinfo_domain_indices = True
264265

265266
# How to display URL addresses: 'footnote', 'no', or 'inline'.
266-
#texinfo_show_urls = 'footnote'
267+
# #texinfo_show_urls = 'footnote'
267268

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

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[metadata]
22
description-file = README.md
3+
4+
[pep8]
5+
max-line-length = 120

test/about_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ def test_bad_version_init(self):
8383

8484
if __name__ == '__main__':
8585
suite = unittest.TestLoader().loadTestsFromTestCase(AboutTest)
86-
unittest.TextTestRunner(verbosity=2).run(suite)
86+
unittest.TextTestRunner(verbosity=2).run(suite)

test/attachment_test.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,10 @@ def test_ToJSON(self):
301301
attachment = Attachment(
302302
**{"usage_type": "test", "content_type": "test", "length": 1, "sha2": "test", "fileurl": "test",
303303
"display": {"en-US": "test"}, "description": {"en-US": "test"}})
304-
self.assertEqual(attachment.to_json(),
305-
'''{"sha2": "test", "contentType": "test", "description": {"en-US": "test"}, "usageType": "test", "length": 1, "fileUrl": "test", "display": {"en-US": "test"}}''')
304+
self.assertEqual(attachment.to_json(), ('{"sha2": "test", "contentType": "test", '
305+
'"description": {"en-US": "test"}, '
306+
'"usageType": "test", "length": 1, "fileUrl": "test", '
307+
'"display": {"en-US": "test"}}'))
306308

307309
def test_ToJSONEmpty(self):
308310
attachment = Attachment()
@@ -319,9 +321,10 @@ def test_ToJSONFromJSON(self):
319321
self.assertEqual(attachment.fileurl, 'test')
320322
self.languageMapVerificationHelper(attachment.description)
321323
self.languageMapVerificationHelper(attachment.display)
322-
self.assertEqual(attachment.to_json(),
323-
'{"sha2": "test", "contentType": "test", "description": {"en-US": "test"}, '
324-
'"usageType": "test", "length": 1, "fileUrl": "test", "display": {"en-US": "test"}}')
324+
self.assertEqual(
325+
attachment.to_json(),
326+
'{"sha2": "test", "contentType": "test", "description": {"en-US": "test"}, '
327+
'"usageType": "test", "length": 1, "fileUrl": "test", "display": {"en-US": "test"}}')
325328

326329
def languageMapVerificationHelper(self, value):
327330
self.assertIsInstance(value, LanguageMap)

test/context_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ def test_InitEmpty(self):
3535
ctx = Context()
3636
self.assertIsInstance(ctx, Context)
3737
self.assertEqual(vars(ctx), {'_context_activities': None,
38-
'_extensions': None,
39-
'_instructor': None,
40-
'_language': None,
41-
'_platform': None,
42-
'_registration': None,
43-
'_revision': None,
44-
'_statement': None,
45-
'_team': None})
38+
'_extensions': None,
39+
'_instructor': None,
40+
'_language': None,
41+
'_platform': None,
42+
'_registration': None,
43+
'_revision': None,
44+
'_statement': None,
45+
'_team': None})
4646

4747
def test_InitAll(self):
4848
ctx = Context(

0 commit comments

Comments
 (0)