Skip to content

Commit f46582c

Browse files
yoshi-automationtseaver
authored andcommitted
Blacken noxfile.py, setup.py (via synth). (googleapis#8116)
1 parent 4a1d6f4 commit f46582c

File tree

3 files changed

+55
-60
lines changed

3 files changed

+55
-60
lines changed

bigquery_datatransfer/noxfile.py

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323

2424
LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core"))
2525

26+
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
27+
28+
if os.path.exists("samples"):
29+
BLACK_PATHS.append("samples")
30+
31+
2632
@nox.session(python="3.7")
2733
def lint(session):
2834
"""Run linters.
@@ -31,13 +37,7 @@ def lint(session):
3137
serious code quality issues.
3238
"""
3339
session.install("flake8", "black", *LOCAL_DEPS)
34-
session.run(
35-
"black",
36-
"--check",
37-
"google",
38-
"tests",
39-
"docs",
40-
)
40+
session.run("black", "--check", *BLACK_PATHS)
4141
session.run("flake8", "google", "tests")
4242

4343

@@ -52,12 +52,7 @@ def blacken(session):
5252
check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
5353
"""
5454
session.install("black")
55-
session.run(
56-
"black",
57-
"google",
58-
"tests",
59-
"docs",
60-
)
55+
session.run("black", *BLACK_PATHS)
6156

6257

6358
@nox.session(python="3.7")
@@ -140,21 +135,24 @@ def cover(session):
140135

141136
session.run("coverage", "erase")
142137

138+
143139
@nox.session(python="3.7")
144140
def docs(session):
145141
"""Build the docs for this library."""
146142

147-
session.install('-e', '.')
148-
session.install('sphinx', 'alabaster', 'recommonmark')
143+
session.install("-e", ".")
144+
session.install("sphinx", "alabaster", "recommonmark")
149145

150-
shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
146+
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
151147
session.run(
152-
'sphinx-build',
153-
'-W', # warnings as errors
154-
'-T', # show full traceback on exception
155-
'-N', # no colors
156-
'-b', 'html',
157-
'-d', os.path.join('docs', '_build', 'doctrees', ''),
158-
os.path.join('docs', ''),
159-
os.path.join('docs', '_build', 'html', ''),
148+
"sphinx-build",
149+
"-W", # warnings as errors
150+
"-T", # show full traceback on exception
151+
"-N", # no colors
152+
"-b",
153+
"html",
154+
"-d",
155+
os.path.join("docs", "_build", "doctrees", ""),
156+
os.path.join("docs", ""),
157+
os.path.join("docs", "_build", "html", ""),
160158
)

bigquery_datatransfer/setup.py

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,70 +20,67 @@
2020

2121
# Package metadata.
2222

23-
name = 'google-cloud-bigquery-datatransfer'
24-
description = 'BigQuery Data Transfer API client library'
25-
version = '0.3.0'
23+
name = "google-cloud-bigquery-datatransfer"
24+
description = "BigQuery Data Transfer API client library"
25+
version = "0.3.0"
2626
# Should be one of:
2727
# 'Development Status :: 3 - Alpha'
2828
# 'Development Status :: 4 - Beta'
2929
# 'Development Status :: 5 - Production/Stable'
30-
release_status = 'Development Status :: 3 - Alpha'
31-
dependencies = [
32-
'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
33-
]
34-
extras = {
35-
}
30+
release_status = "Development Status :: 3 - Alpha"
31+
dependencies = ["google-api-core[grpc] >= 1.4.1, < 2.0.0dev"]
32+
extras = {}
3633

3734

3835
# Setup boilerplate below this line.
3936

4037
package_root = os.path.abspath(os.path.dirname(__file__))
4138

42-
readme_filename = os.path.join(package_root, 'README.rst')
43-
with io.open(readme_filename, encoding='utf-8') as readme_file:
39+
readme_filename = os.path.join(package_root, "README.rst")
40+
with io.open(readme_filename, encoding="utf-8") as readme_file:
4441
readme = readme_file.read()
4542

4643
# Only include packages under the 'google' namespace. Do not include tests,
4744
# benchmarks, etc.
4845
packages = [
49-
package for package in setuptools.find_packages()
50-
if package.startswith('google')]
46+
package for package in setuptools.find_packages() if package.startswith("google")
47+
]
5148

5249
# Determine which namespaces are needed.
53-
namespaces = ['google']
54-
if 'google.cloud' in packages:
55-
namespaces.append('google.cloud')
50+
namespaces = ["google"]
51+
if "google.cloud" in packages:
52+
namespaces.append("google.cloud")
5653

5754

5855
setuptools.setup(
5956
name=name,
6057
version=version,
6158
description=description,
6259
long_description=readme,
63-
author='Google LLC',
64-
author_email='googleapis-packages@google.com',
65-
license='Apache 2.0',
66-
url='https://github.com/GoogleCloudPlatform/google-cloud-python',
60+
author="Google LLC",
61+
author_email="googleapis-packages@google.com",
62+
license="Apache 2.0",
63+
url="https://github.com/GoogleCloudPlatform/google-cloud-python",
6764
classifiers=[
6865
release_status,
69-
'Intended Audience :: Developers',
70-
'License :: OSI Approved :: Apache Software License',
71-
'Programming Language :: Python',
72-
'Programming Language :: Python :: 2',
73-
'Programming Language :: Python :: 2.7',
74-
'Programming Language :: Python :: 3',
75-
'Programming Language :: Python :: 3.5',
76-
'Programming Language :: Python :: 3.6',
77-
'Programming Language :: Python :: 3.7',
78-
'Operating System :: OS Independent',
79-
'Topic :: Internet',
66+
"Intended Audience :: Developers",
67+
"License :: OSI Approved :: Apache Software License",
68+
"Programming Language :: Python",
69+
"Programming Language :: Python :: 2",
70+
"Programming Language :: Python :: 2.7",
71+
"Programming Language :: Python :: 3",
72+
"Programming Language :: Python :: 3.5",
73+
"Programming Language :: Python :: 3.6",
74+
"Programming Language :: Python :: 3.7",
75+
"Operating System :: OS Independent",
76+
"Topic :: Internet",
8077
],
81-
platforms='Posix; MacOS X; Windows',
78+
platforms="Posix; MacOS X; Windows",
8279
packages=packages,
8380
namespace_packages=namespaces,
8481
install_requires=dependencies,
8582
extras_require=extras,
86-
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
83+
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
8784
include_package_data=True,
8885
zip_safe=False,
8986
)

bigquery_datatransfer/synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"updateTime": "2019-05-21T12:13:36.616207Z",
2+
"updateTime": "2019-05-24T12:13:24.651931Z",
33
"sources": [
44
{
55
"generator": {
@@ -12,8 +12,8 @@
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160",
16-
"internalRef": "249058354"
15+
"sha": "0537189470f04f24836d6959821c24197a0ed120",
16+
"internalRef": "249742806"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)