Skip to content

Commit 83713b0

Browse files
authored
Run Black on Generated libraries (#6666)
* blacken appveyor * Blacken all gen'd libraries not under PR
1 parent a5f647b commit 83713b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3727
-3768
lines changed

docs/conf.py

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

23-
__version__ = '0.90.4'
23+
__version__ = "0.90.4"
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.
3333
extensions = [
34-
'sphinx.ext.autodoc',
35-
'sphinx.ext.autosummary',
36-
'sphinx.ext.doctest',
37-
'sphinx.ext.intersphinx',
38-
'sphinx.ext.coverage',
39-
'sphinx.ext.napoleon',
40-
'sphinx.ext.viewcode',
34+
"sphinx.ext.autodoc",
35+
"sphinx.ext.autosummary",
36+
"sphinx.ext.doctest",
37+
"sphinx.ext.intersphinx",
38+
"sphinx.ext.coverage",
39+
"sphinx.ext.napoleon",
40+
"sphinx.ext.viewcode",
4141
]
4242

4343
# autodoc/autosummary flags
44-
autoclass_content = 'both'
45-
autodoc_default_flags = ['members']
44+
autoclass_content = "both"
45+
autodoc_default_flags = ["members"]
4646
autosummary_generate = True
4747

4848
# Add any paths that contain templates here, relative to this directory.
49-
templates_path = ['_templates']
49+
templates_path = ["_templates"]
5050

5151
# Allow markdown includes (so releases.md can include CHANGLEOG.md)
5252
# http://www.sphinx-doc.org/en/master/markdown.html
53-
source_parsers = {
54-
'.md': 'recommonmark.parser.CommonMarkParser',
55-
}
53+
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
5654

5755
# The suffix(es) of source filenames.
5856
# You can specify multiple suffix as a list of string:
5957
# source_suffix = ['.rst', '.md']
60-
source_suffix = '.rst'
58+
source_suffix = ".rst"
6159

6260
# The encoding of source files.
63-
#source_encoding = 'utf-8-sig'
61+
# source_encoding = 'utf-8-sig'
6462

6563
# The master toctree document.
66-
master_doc = 'index'
64+
master_doc = "index"
6765

6866
# General information about the project.
69-
project = u'google-cloud-spanner'
70-
copyright = u'2017, Google'
71-
author = u'Google APIs'
67+
project = u"google-cloud-spanner"
68+
copyright = u"2017, Google"
69+
author = u"Google APIs"
7270

7371
# The version info for the project you're documenting, acts as replacement for
7472
# |version| and |release|, also used in various other places throughout the
@@ -77,7 +75,7 @@
7775
# The full version, including alpha/beta/rc tags.
7876
release = __version__
7977
# The short X.Y version.
80-
version = '.'.join(release.split('.')[0:2])
78+
version = ".".join(release.split(".")[0:2])
8179

8280
# The language for content autogenerated by Sphinx. Refer to documentation
8381
# for a list of supported languages.
@@ -88,37 +86,37 @@
8886

8987
# There are two options for replacing |today|: either, you set today to some
9088
# non-false value, then it is used:
91-
#today = ''
89+
# today = ''
9290
# Else, today_fmt is used as the format for a strftime call.
93-
#today_fmt = '%B %d, %Y'
91+
# today_fmt = '%B %d, %Y'
9492

9593
# List of patterns, relative to source directory, that match files and
9694
# directories to ignore when looking for source files.
97-
exclude_patterns = ['_build']
95+
exclude_patterns = ["_build"]
9896

9997
# The reST default role (used for this markup: `text`) to use for all
10098
# documents.
101-
#default_role = None
99+
# default_role = None
102100

103101
# If true, '()' will be appended to :func: etc. cross-reference text.
104-
#add_function_parentheses = True
102+
# add_function_parentheses = True
105103

106104
# If true, the current module name will be prepended to all description
107105
# unit titles (such as .. function::).
108-
#add_module_names = True
106+
# add_module_names = True
109107

110108
# If true, sectionauthor and moduleauthor directives will be shown in the
111109
# output. They are ignored by default.
112-
#show_authors = False
110+
# show_authors = False
113111

114112
# The name of the Pygments (syntax highlighting) style to use.
115-
pygments_style = 'sphinx'
113+
pygments_style = "sphinx"
116114

117115
# A list of ignored prefixes for module index sorting.
118-
#modindex_common_prefix = []
116+
# modindex_common_prefix = []
119117

120118
# If true, keep warnings as "system message" paragraphs in the built documents.
121-
#keep_warnings = False
119+
# keep_warnings = False
122120

123121
# If true, `todo` and `todoList` produce output, else they produce nothing.
124122
todo_include_todos = True
@@ -127,31 +125,31 @@
127125

128126
# The theme to use for HTML and HTML Help pages. See the documentation for
129127
# a list of builtin themes.
130-
html_theme = 'alabaster'
128+
html_theme = "alabaster"
131129

132130
# Theme options are theme-specific and customize the look and feel of a theme
133131
# further. For a list of options available for each theme, see the
134132
# documentation.
135-
#html_theme_options = {}
133+
# html_theme_options = {}
136134

137135
# Add any paths that contain custom themes here, relative to this directory.
138-
#html_theme_path = []
136+
# html_theme_path = []
139137

140138
# The name for this set of Sphinx documents. If None, it defaults to
141139
# "<project> v<release> documentation".
142-
#html_title = None
140+
# html_title = None
143141

144142
# A shorter title for the navigation bar. Default is the same as html_title.
145-
#html_short_title = None
143+
# html_short_title = None
146144

147145
# The name of an image file (relative to this directory) to place at the top
148146
# of the sidebar.
149-
#html_logo = None
147+
# html_logo = None
150148

151149
# The name of an image file (within the static path) to use as favicon of the
152150
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
153151
# pixels large.
154-
#html_favicon = None
152+
# html_favicon = None
155153

156154
# Add any paths that contain custom static files (such as style sheets) here,
157155
# relative to this directory. They are copied after the builtin static files,
@@ -161,78 +159,75 @@
161159
# Add any extra paths that contain custom files (such as robots.txt or
162160
# .htaccess) here, relative to this directory. These files are copied
163161
# directly to the root of the documentation.
164-
#html_extra_path = []
162+
# html_extra_path = []
165163

166164
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
167165
# using the given strftime format.
168-
#html_last_updated_fmt = '%b %d, %Y'
166+
# html_last_updated_fmt = '%b %d, %Y'
169167

170168
# If true, SmartyPants will be used to convert quotes and dashes to
171169
# typographically correct entities.
172-
#html_use_smartypants = True
170+
# html_use_smartypants = True
173171

174172
# Custom sidebar templates, maps document names to template names.
175-
#html_sidebars = {}
173+
# html_sidebars = {}
176174

177175
# Additional templates that should be rendered to pages, maps page names to
178176
# template names.
179-
#html_additional_pages = {}
177+
# html_additional_pages = {}
180178

181179
# If false, no module index is generated.
182-
#html_domain_indices = True
180+
# html_domain_indices = True
183181

184182
# If false, no index is generated.
185-
#html_use_index = True
183+
# html_use_index = True
186184

187185
# If true, the index is split into individual pages for each letter.
188-
#html_split_index = False
186+
# html_split_index = False
189187

190188
# If true, links to the reST sources are added to the pages.
191-
#html_show_sourcelink = True
189+
# html_show_sourcelink = True
192190

193191
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
194-
#html_show_sphinx = True
192+
# html_show_sphinx = True
195193

196194
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
197-
#html_show_copyright = True
195+
# html_show_copyright = True
198196

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

204202
# This is the file name suffix for HTML files (e.g. ".xhtml").
205-
#html_file_suffix = None
203+
# html_file_suffix = None
206204

207205
# Language to be used for generating the HTML full-text search index.
208206
# Sphinx supports the following languages:
209207
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
210208
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
211-
#html_search_language = 'en'
209+
# html_search_language = 'en'
212210

213211
# A dictionary with options for the search language support, empty by default.
214212
# Now only 'ja' uses this config value
215-
#html_search_options = {'type': 'default'}
213+
# html_search_options = {'type': 'default'}
216214

217215
# The name of a javascript file (relative to the configuration directory) that
218216
# implements a search results scorer. If empty, the default will be used.
219-
#html_search_scorer = 'scorer.js'
217+
# html_search_scorer = 'scorer.js'
220218

221219
# Output file base name for HTML help builder.
222-
htmlhelp_basename = 'google-cloud-spanner-doc'
220+
htmlhelp_basename = "google-cloud-spanner-doc"
223221

224222
# -- Options for LaTeX output ---------------------------------------------
225223

226224
latex_elements = {
227225
# The paper size ('letterpaper' or 'a4paper').
228226
#'papersize': 'letterpaper',
229-
230227
# The font size ('10pt', '11pt' or '12pt').
231228
#'pointsize': '10pt',
232-
233229
# Additional stuff for the LaTeX preamble.
234230
#'preamble': '',
235-
236231
# Latex figure (float) alignment
237232
#'figure_align': 'htbp',
238233
}
@@ -241,67 +236,85 @@
241236
# (source start file, target name, title,
242237
# author, documentclass [howto, manual, or own class]).
243238
latex_documents = [
244-
(master_doc, 'google-cloud-spanner.tex',
245-
u'google-cloud-spanner Documentation', author, 'manual'),
239+
(
240+
master_doc,
241+
"google-cloud-spanner.tex",
242+
u"google-cloud-spanner Documentation",
243+
author,
244+
"manual",
245+
)
246246
]
247247

248248
# The name of an image file (relative to this directory) to place at the top of
249249
# the title page.
250-
#latex_logo = None
250+
# latex_logo = None
251251

252252
# For "manual" documents, if this is true, then toplevel headings are parts,
253253
# not chapters.
254-
#latex_use_parts = False
254+
# latex_use_parts = False
255255

256256
# If true, show page references after internal links.
257-
#latex_show_pagerefs = False
257+
# latex_show_pagerefs = False
258258

259259
# If true, show URL addresses after external links.
260-
#latex_show_urls = False
260+
# latex_show_urls = False
261261

262262
# Documents to append as an appendix to all manuals.
263-
#latex_appendices = []
263+
# latex_appendices = []
264264

265265
# If false, no module index is generated.
266-
#latex_domain_indices = True
266+
# latex_domain_indices = True
267267

268268
# -- Options for manual page output ---------------------------------------
269269

270270
# One entry per manual page. List of tuples
271271
# (source start file, name, description, authors, manual section).
272-
man_pages = [(master_doc, 'google-cloud-spanner',
273-
u'google-cloud-spanner Documentation', [author], 1)]
272+
man_pages = [
273+
(
274+
master_doc,
275+
"google-cloud-spanner",
276+
u"google-cloud-spanner Documentation",
277+
[author],
278+
1,
279+
)
280+
]
274281

275282
# If true, show URL addresses after external links.
276-
#man_show_urls = False
283+
# man_show_urls = False
277284

278285
# -- Options for Texinfo output -------------------------------------------
279286

280287
# Grouping the document tree into Texinfo files. List of tuples
281288
# (source start file, target name, title, author,
282289
# dir menu entry, description, category)
283290
texinfo_documents = [
284-
(master_doc, 'google-cloud-spanner',
285-
u'google-cloud-spanner Documentation', author, 'google-cloud-spanner',
286-
'GAPIC library for the {metadata.shortName} v1 service', 'APIs'),
291+
(
292+
master_doc,
293+
"google-cloud-spanner",
294+
u"google-cloud-spanner Documentation",
295+
author,
296+
"google-cloud-spanner",
297+
"GAPIC library for the {metadata.shortName} v1 service",
298+
"APIs",
299+
)
287300
]
288301

289302
# Documents to append as an appendix to all manuals.
290-
#texinfo_appendices = []
303+
# texinfo_appendices = []
291304

292305
# If false, no module index is generated.
293-
#texinfo_domain_indices = True
306+
# texinfo_domain_indices = True
294307

295308
# How to display URL addresses: 'footnote', 'no', or 'inline'.
296-
#texinfo_show_urls = 'footnote'
309+
# texinfo_show_urls = 'footnote'
297310

298311
# If true, do not generate a @detailmenu in the "Top" node's menu.
299-
#texinfo_no_detailmenu = False
312+
# texinfo_no_detailmenu = False
300313

301314
# Example configuration for intersphinx: refer to the Python standard library.
302315
intersphinx_mapping = {
303-
'python': ('http://python.readthedocs.org/en/latest/', None),
304-
'gax': ('https://gax-python.readthedocs.org/en/latest/', None),
316+
"python": ("http://python.readthedocs.org/en/latest/", None),
317+
"gax": ("https://gax-python.readthedocs.org/en/latest/", None),
305318
}
306319

307320
# Napoleon settings

google/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
try:
22
import pkg_resources
3+
34
pkg_resources.declare_namespace(__name__)
45
except ImportError:
56
import pkgutil
7+
68
__path__ = pkgutil.extend_path(__path__, __name__)

google/cloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
try:
22
import pkg_resources
3+
34
pkg_resources.declare_namespace(__name__)
45
except ImportError:
56
import pkgutil
7+
68
__path__ = pkgutil.extend_path(__path__, __name__)

0 commit comments

Comments
 (0)