Skip to content

Commit 2372142

Browse files
committed
Fix PEP8 issues.
Fix some pep8 issues in doc/source/conf.py and tests/test_shell.py make the code looks pretty. Change-Id: I927f03aff4190f1ac30eb56e7c545de555978c31
1 parent 8010e77 commit 2372142

2 files changed

Lines changed: 32 additions & 21 deletions

File tree

doc/source/conf.py

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# OpenStack Command Line Client documentation build configuration file, created by
4-
# sphinx-quickstart on Wed May 16 12:05:58 2012.
3+
# OpenStack Command Line Client documentation build configuration file, created
4+
# by sphinx-quickstart on Wed May 16 12:05:58 2012.
55
#
6-
# This file is execfile()d with the current directory set to its containing dir.
6+
# This file is execfile()d with the current directory set to its containing
7+
# dir.
78
#
89
# Note that not all possible configuration values are present in this
910
# autogenerated file.
1011
#
1112
# All configuration values have a default; values that are commented out
1213
# serve to show the default.
1314

14-
import sys, os
15+
import os
16+
import sys
1517

1618
# If extensions (or modules to document with autodoc) are in another directory,
1719
# add these directories to sys.path here. If the directory is relative to the
1820
# documentation root, use os.path.abspath to make it absolute, like shown here.
1921
#sys.path.insert(0, os.path.abspath('.'))
2022

21-
# -- General configuration -----------------------------------------------------
23+
# -- General configuration ----------------------------------------------------
2224

2325
# If your documentation needs a minimal Sphinx version, state it here.
2426
#needs_sphinx = '1.0'
2527

26-
# Add any Sphinx extension module names here, as strings. They can be extensions
27-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
28+
# Add any Sphinx extension module names here, as strings. They can be
29+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30+
extensions = ['sphinx.ext.autodoc',
31+
'sphinx.ext.doctest',
32+
'sphinx.ext.intersphinx',
33+
'sphinx.ext.todo']
2934

3035
# Add any paths that contain templates here, relative to this directory.
3136
templates_path = ['_templates']
@@ -66,7 +71,8 @@
6671
# directories to ignore when looking for source files.
6772
exclude_patterns = []
6873

69-
# The reST default role (used for this markup: `text`) to use for all documents.
74+
# The reST default role (used for this markup: `text`) to use for all
75+
# documents.
7076
#default_role = None
7177

7278
# If true, '()' will be appended to :func: etc. cross-reference text.
@@ -87,7 +93,7 @@
8793
#modindex_common_prefix = []
8894

8995

90-
# -- Options for HTML output ---------------------------------------------------
96+
# -- Options for HTML output --------------------------------------------------
9197

9298
# The theme to use for HTML and HTML Help pages. See the documentation for
9399
# a list of builtin themes.
@@ -167,7 +173,7 @@
167173
htmlhelp_basename = 'OpenStackCommandLineClientdoc'
168174

169175

170-
# -- Options for LaTeX output --------------------------------------------------
176+
# -- Options for LaTeX output -------------------------------------------------
171177

172178
latex_elements = {
173179
# The paper size ('letterpaper' or 'a4paper').
@@ -181,10 +187,12 @@
181187
}
182188

183189
# Grouping the document tree into LaTeX files. List of tuples
184-
# (source start file, target name, title, author, documentclass [howto/manual]).
190+
# (source start file, target name, title, author, documentclass [howto/manual])
191+
# .
185192
latex_documents = [
186-
('index', 'OpenStackCommandLineClient.tex', u'OpenStack Command Line Client Documentation',
187-
u'OpenStack', 'manual'),
193+
('index', 'OpenStackCommandLineClient.tex',
194+
u'OpenStack Command Line Client Documentation',
195+
u'OpenStack', 'manual'),
188196
]
189197

190198
# The name of an image file (relative to this directory) to place at the top of
@@ -208,28 +216,31 @@
208216
#latex_domain_indices = True
209217

210218

211-
# -- Options for manual page output --------------------------------------------
219+
# -- Options for manual page output -------------------------------------------
212220

213221
# One entry per manual page. List of tuples
214222
# (source start file, name, description, authors, manual section).
215223
man_pages = [
216-
('index', 'openstackcommandlineclient', u'OpenStack Command Line Client Documentation',
224+
('index', 'openstackcommandlineclient',
225+
u'OpenStack Command Line Client Documentation',
217226
[u'OpenStack'], 1)
218227
]
219228

220229
# If true, show URL addresses after external links.
221230
#man_show_urls = False
222231

223232

224-
# -- Options for Texinfo output ------------------------------------------------
233+
# -- Options for Texinfo output -----------------------------------------------
225234

226235
# Grouping the document tree into Texinfo files. List of tuples
227236
# (source start file, target name, title, author,
228237
# dir menu entry, description, category)
229238
texinfo_documents = [
230-
('index', 'OpenStackCommandLineClient', u'OpenStack Command Line Client Documentation',
231-
u'OpenStack', 'OpenStackCommandLineClient', 'One line description of project.',
232-
'Miscellaneous'),
239+
('index', 'OpenStackCommandLineClient',
240+
u'OpenStack Command Line Client Documentation',
241+
u'OpenStack', 'OpenStackCommandLineClient',
242+
'One line description of project.',
243+
'Miscellaneous'),
233244
]
234245

235246
# Documents to append as an appendix to all manuals.

tests/test_shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def setUp(self):
6666
# Make a fake shell object, a helping wrapper to call it, and a quick
6767
# way of asserting that certain API calls were made.
6868
global shell, _shell, assert_called, assert_called_anytime
69-
shell = lambda sh,cmd: sh.run(cmd.split())
69+
shell = lambda sh, cmd: sh.run(cmd.split())
7070

7171
# Patch out some common methods
7272
#self.auth_patch = mock.patch(

0 commit comments

Comments
 (0)