Skip to content

Commit e18d05b

Browse files
yoshi-automationtseaver
authored andcommitted
Blacken noxfile.py, setup.py (via synth). (googleapis#8126)
1 parent 6dae20c commit e18d05b

3 files changed

Lines changed: 29 additions & 28 deletions

File tree

irm/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
)

irm/setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
description = "Stackdriver Incident Response & Managment API client library"
2424
version = "0.1.0"
2525
release_status = "Development Status :: 3 - Alpha"
26-
dependencies = ["google-api-core[grpc] >= 1.6.0, < 2.0.0dev", "google-cloud-monitoring >= 0.31.1, < 0.32dev"]
26+
dependencies = [
27+
"google-api-core[grpc] >= 1.6.0, < 2.0.0dev",
28+
"google-cloud-monitoring >= 0.31.1, < 0.32dev",
29+
]
2730

2831
package_root = os.path.abspath(os.path.dirname(__file__))
2932

irm/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:22:55.758451Z",
2+
"updateTime": "2019-05-24T12:22:38.135589Z",
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)