Skip to content

Commit

Permalink
(Re)-blacken (via synth). (#8446)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and tseaver committed Jun 20, 2019
1 parent 37363f7 commit 16c6383
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
1 change: 1 addition & 0 deletions google-cloud-speech/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Generated by synthtool. DO NOT EDIT!
[run]
branch = True

Expand Down
1 change: 1 addition & 0 deletions google-cloud-speech/.flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Generated by synthtool. DO NOT EDIT!
[flake8]
ignore = E203, E266, E501, W503
exclude =
Expand Down
52 changes: 26 additions & 26 deletions google-cloud-speech/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by synthtool. DO NOT EDIT!

from __future__ import absolute_import
import os
import shutil
Expand All @@ -23,6 +25,12 @@

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

BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

if os.path.exists("samples"):
BLACK_PATHS.append("samples")


@nox.session(python="3.7")
def lint(session):
"""Run linters.
Expand All @@ -31,13 +39,7 @@ def lint(session):
serious code quality issues.
"""
session.install("flake8", "black", *LOCAL_DEPS)
session.run(
"black",
"--check",
"google",
"tests",
"docs",
)
session.run("black", "--check", *BLACK_PATHS)
session.run("flake8", "google", "tests")


Expand All @@ -46,18 +48,13 @@ def blacken(session):
"""Run black.
Format code to uniform standard.
This currently uses Python 3.6 due to the automated Kokoro run of synthtool.
That run uses an image that doesn't have 3.6 installed. Before updating this
check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
"""
session.install("black")
session.run(
"black",
"google",
"tests",
"docs",
)
session.run("black", *BLACK_PATHS)


@nox.session(python="3.7")
Expand All @@ -83,7 +80,7 @@ def default(session):
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=",
"--cov-fail-under=97",
"--cov-fail-under=0",
os.path.join("tests", "unit"),
*session.posargs,
)
Expand Down Expand Up @@ -140,21 +137,24 @@ def cover(session):

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


@nox.session(python="3.7")
def docs(session):
"""Build the docs for this library."""

session.install('-e', '.')
session.install('sphinx', 'alabaster', 'recommonmark')
session.install("-e", ".")
session.install("sphinx", "alabaster", "recommonmark")

shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True)
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
'sphinx-build',
'-W', # warnings as errors
'-T', # show full traceback on exception
'-N', # no colors
'-b', 'html',
'-d', os.path.join('docs', '_build', 'doctrees', ''),
os.path.join('docs', ''),
os.path.join('docs', '_build', 'html', ''),
"sphinx-build",
"-W", # warnings as errors
"-T", # show full traceback on exception
"-N", # no colors
"-b",
"html",
"-d",
os.path.join("docs", "_build", "doctrees", ""),
os.path.join("docs", ""),
os.path.join("docs", "_build", "html", ""),
)
1 change: 1 addition & 0 deletions google-cloud-speech/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Generated by synthtool. DO NOT EDIT!
[bdist_wheel]
universal = 1
10 changes: 5 additions & 5 deletions google-cloud-speech/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-19T16:01:34.389010Z",
"updateTime": "2019-06-20T12:28:53.726986Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.28.0",
"dockerImage": "googleapis/artman@sha256:6ced5a36b08b82a328c69844e629300d58c14067f25cadab47f52542bdef7daf"
"version": "0.29.0",
"dockerImage": "googleapis/artman@sha256:b79c8c20ee51e5302686c9d1294672d59290df1489be93749ef17d0172cc508d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "ac13167e31a20314aa05cc9911c95df250880485",
"internalRef": "253867808"
"sha": "45e125f9e30dc5d45b52752b3ab78dd4f6084f2d",
"internalRef": "254026509"
}
},
{
Expand Down

0 comments on commit 16c6383

Please sign in to comment.