Skip to content

Commit d3f4a3d

Browse files
committed
Blacken everything else
Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I356643d06b2cd408ccaedfe02b858aea55388949 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
1 parent a6f81a7 commit d3f4a3d

12 files changed

Lines changed: 209 additions & 190 deletions

File tree

doc/source/conf.py

Lines changed: 81 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@
1515
# -- General configuration ----------------------------------------------------
1616

1717
# If your documentation needs a minimal Sphinx version, state it here.
18-
#needs_sphinx = '1.0'
18+
# needs_sphinx = '1.0'
1919

2020
# Add any Sphinx extension module names here, as strings. They can be
2121
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
22-
extensions = ['sphinx.ext.autodoc',
23-
'sphinx.ext.doctest',
24-
'sphinx.ext.todo',
25-
'openstackdocstheme',
26-
'stevedore.sphinxext',
27-
'cliff.sphinxext',
28-
'sphinxcontrib.apidoc',
29-
]
22+
extensions = [
23+
'sphinx.ext.autodoc',
24+
'sphinx.ext.doctest',
25+
'sphinx.ext.todo',
26+
'openstackdocstheme',
27+
'stevedore.sphinxext',
28+
'cliff.sphinxext',
29+
'sphinxcontrib.apidoc',
30+
]
3031

3132
# openstackdocstheme options
3233
openstackdocs_repo_name = 'openstack/python-openstackclient'
@@ -39,13 +40,13 @@
3940
]
4041

4142
# Add any paths that contain templates here, relative to this directory.
42-
#templates_path = ['_templates']
43+
# templates_path = ['_templates']
4344

4445
# The suffix of source filenames.
4546
source_suffix = '.rst'
4647

4748
# The encoding of source files.
48-
#source_encoding = 'utf-8-sig'
49+
# source_encoding = 'utf-8-sig'
4950

5051
# The master toctree document.
5152
master_doc = 'index'
@@ -56,32 +57,32 @@
5657

5758
# The language for content autogenerated by Sphinx. Refer to documentation
5859
# for a list of supported languages.
59-
#language = None
60+
# language = None
6061

6162
# There are two options for replacing |today|: either, you set today to some
6263
# non-false value, then it is used:
63-
#today = ''
64+
# today = ''
6465
# Else, today_fmt is used as the format for a strftime call.
65-
#today_fmt = '%B %d, %Y'
66+
# today_fmt = '%B %d, %Y'
6667

6768
# List of patterns, relative to source directory, that match files and
6869
# directories to ignore when looking for source files.
6970
exclude_patterns = ['**tests**']
7071

7172
# The reST default role (used for this markup: `text`) to use for all
7273
# documents.
73-
#default_role = None
74+
# default_role = None
7475

7576
# If true, '()' will be appended to :func: etc. cross-reference text.
76-
#add_function_parentheses = True
77+
# add_function_parentheses = True
7778

7879
# If true, the current module name will be prepended to all description
7980
# unit titles (such as .. function::).
80-
#add_module_names = True
81+
# add_module_names = True
8182

8283
# If true, sectionauthor and moduleauthor directives will be shown in the
8384
# output. They are ignored by default.
84-
#show_authors = False
85+
# show_authors = False
8586

8687
# The name of the Pygments (syntax highlighting) style to use.
8788
pygments_style = 'native'
@@ -94,75 +95,75 @@
9495

9596
# The theme to use for HTML and HTML Help pages. See the documentation for
9697
# a list of builtin themes.
97-
#html_theme_path = ["."]
98-
#html_theme = '_theme'
98+
# html_theme_path = ["."]
99+
# html_theme = '_theme'
99100
html_theme = 'openstackdocs'
100101

101102
# Theme options are theme-specific and customize the look and feel of a theme
102103
# further. For a list of options available for each theme, see the
103104
# documentation.
104-
#html_theme_options = {}
105+
# html_theme_options = {}
105106

106107
# Add any paths that contain custom themes here, relative to this directory.
107-
#html_theme_path = []
108+
# html_theme_path = []
108109

109110
# The name for this set of Sphinx documents. If None, it defaults to
110111
# "<project> v<release> documentation".
111-
#html_title = None
112+
# html_title = None
112113

113114
# A shorter title for the navigation bar. Default is the same as html_title.
114-
#html_short_title = None
115+
# html_short_title = None
115116

116117
# The name of an image file (relative to this directory) to place at the top
117118
# of the sidebar.
118-
#html_logo = None
119+
# html_logo = None
119120

120121
# The name of an image file (within the static path) to use as favicon of the
121122
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
122123
# pixels large.
123-
#html_favicon = None
124+
# html_favicon = None
124125

125126
# Add any paths that contain custom static files (such as style sheets) here,
126127
# relative to this directory. They are copied after the builtin static files,
127128
# so a file named "default.css" will overwrite the builtin "default.css".
128-
#html_static_path = ['_static']
129+
# html_static_path = ['_static']
129130

130131
# If true, SmartyPants will be used to convert quotes and dashes to
131132
# typographically correct entities.
132-
#html_use_smartypants = True
133+
# html_use_smartypants = True
133134

134135
# Custom sidebar templates, maps document names to template names.
135-
#html_sidebars = {}
136+
# html_sidebars = {}
136137

137138
# Additional templates that should be rendered to pages, maps page names to
138139
# template names.
139-
#html_additional_pages = {}
140+
# html_additional_pages = {}
140141

141142
# If false, no module index is generated.
142-
#html_domain_indices = True
143+
# html_domain_indices = True
143144

144145
# If false, no index is generated.
145-
#html_use_index = True
146+
# html_use_index = True
146147

147148
# If true, the index is split into individual pages for each letter.
148-
#html_split_index = False
149+
# html_split_index = False
149150

150151
# If true, links to the reST sources are added to the pages.
151-
#html_show_sourcelink = True
152+
# html_show_sourcelink = True
152153

153154
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
154-
#html_show_sphinx = True
155+
# html_show_sphinx = True
155156

156157
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
157-
#html_show_copyright = True
158+
# html_show_copyright = True
158159

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

164165
# This is the file name suffix for HTML files (e.g. ".xhtml").
165-
#html_file_suffix = None
166+
# html_file_suffix = None
166167

167168
# Output file base name for HTML help builder.
168169
htmlhelp_basename = 'OpenStackCommandLineClientdoc'
@@ -174,44 +175,46 @@
174175
# -- Options for LaTeX output -------------------------------------------------
175176

176177
latex_elements = {
177-
# The paper size ('letterpaper' or 'a4paper').
178-
#'papersize': 'letterpaper',
179-
180-
# The font size ('10pt', '11pt' or '12pt').
181-
#'pointsize': '10pt',
182-
183-
# Additional stuff for the LaTeX preamble.
184-
#'preamble': '',
178+
# The paper size ('letterpaper' or 'a4paper').
179+
#'papersize': 'letterpaper',
180+
# The font size ('10pt', '11pt' or '12pt').
181+
#'pointsize': '10pt',
182+
# Additional stuff for the LaTeX preamble.
183+
#'preamble': '',
185184
}
186185

187186
# Grouping the document tree into LaTeX files. List of tuples
188187
# (source start file, target name, title, author, documentclass [howto/manual])
189188
# .
190189
latex_documents = [
191-
('index', 'OpenStackCommandLineClient.tex',
192-
'OpenStack Command Line Client Documentation',
193-
'OpenStack', 'manual'),
190+
(
191+
'index',
192+
'OpenStackCommandLineClient.tex',
193+
'OpenStack Command Line Client Documentation',
194+
'OpenStack',
195+
'manual',
196+
),
194197
]
195198

196199
# The name of an image file (relative to this directory) to place at the top of
197200
# the title page.
198-
#latex_logo = None
201+
# latex_logo = None
199202

200203
# For "manual" documents, if this is true, then toplevel headings are parts,
201204
# not chapters.
202-
#latex_use_parts = False
205+
# latex_use_parts = False
203206

204207
# If true, show page references after internal links.
205-
#latex_show_pagerefs = False
208+
# latex_show_pagerefs = False
206209

207210
# If true, show URL addresses after external links.
208-
#latex_show_urls = False
211+
# latex_show_urls = False
209212

210213
# Documents to append as an appendix to all manuals.
211-
#latex_appendices = []
214+
# latex_appendices = []
212215

213216
# If false, no module index is generated.
214-
#latex_domain_indices = True
217+
# latex_domain_indices = True
215218

216219

217220
# -- Options for manual page output -------------------------------------------
@@ -229,7 +232,7 @@
229232
]
230233

231234
# If true, show URL addresses after external links.
232-
#man_show_urls = False
235+
# man_show_urls = False
233236

234237

235238
# -- Options for Texinfo output -----------------------------------------------
@@ -238,30 +241,42 @@
238241
# (source start file, target name, title, author,
239242
# dir menu entry, description, category)
240243
texinfo_documents = [
241-
('index', 'OpenStackCommandLineClient',
242-
'OpenStack Command Line Client Documentation',
243-
'OpenStack', 'OpenStackCommandLineClient',
244-
'One line description of project.',
245-
'Miscellaneous'),
244+
(
245+
'index',
246+
'OpenStackCommandLineClient',
247+
'OpenStack Command Line Client Documentation',
248+
'OpenStack',
249+
'OpenStackCommandLineClient',
250+
'One line description of project.',
251+
'Miscellaneous',
252+
),
246253
]
247254

248255
# Documents to append as an appendix to all manuals.
249-
#texinfo_appendices = []
256+
# texinfo_appendices = []
250257

251258
# If false, no module index is generated.
252-
#texinfo_domain_indices = True
259+
# texinfo_domain_indices = True
253260

254261
# How to display URL addresses: 'footnote', 'no', or 'inline'.
255-
#texinfo_show_urls = 'footnote'
262+
# texinfo_show_urls = 'footnote'
256263

257264

258265
# -- Options for cliff.sphinxext plugin ---------------------------------------
259266

260267
autoprogram_cliff_application = 'openstack'
261268

262269
autoprogram_cliff_ignored = [
263-
'--help', '--format', '--column', '--max-width', '--fit-width',
264-
'--print-empty', '--prefix', '--noindent', '--quote']
270+
'--help',
271+
'--format',
272+
'--column',
273+
'--max-width',
274+
'--fit-width',
275+
'--print-empty',
276+
'--prefix',
277+
'--noindent',
278+
'--quote',
279+
]
265280

266281
# Prevent cliff from generating "This command is provided by the
267282
# python-openstackclient plugin."

examples/common.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
# Generally useful stuff often found in a utils module
5959

60+
6061
def env(*vars, **kwargs):
6162
"""Search for the first defined of possibly many env vars
6263
@@ -73,6 +74,7 @@ def env(*vars, **kwargs):
7374

7475
# Common Example functions
7576

77+
7678
def base_parser(parser):
7779
"""Set up some of the common CLI options
7880
@@ -128,7 +130,8 @@ def base_parser(parser):
128130
help="Print API call timing info",
129131
)
130132
parser.add_argument(
131-
'-v', '--verbose',
133+
'-v',
134+
'--verbose',
132135
action='count',
133136
dest='verbose_level',
134137
default=1,
@@ -225,16 +228,14 @@ def make_session(opts, **kwargs):
225228
)
226229
auth_p = auth_plugin.load_from_options(**auth_params)
227230

228-
session = ks_session.Session(
229-
auth=auth_p,
230-
**kwargs
231-
)
231+
session = ks_session.Session(auth=auth_p, **kwargs)
232232

233233
return session
234234

235235

236236
# Top-level functions
237237

238+
238239
def run(opts):
239240
"""Default run command"""
240241

0 commit comments

Comments
 (0)