Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Update noxfile to blacken samples directory. #248

Merged
merged 3 commits into from
May 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions synthtool/gcp/templates/python_library/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ import nox

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"):
busunkim96 marked this conversation as resolved.
Show resolved Hide resolved
BLACK_PATHS.append("samples")

@nox.session(python="3.7")
def lint(session):
"""Run linters.
Expand All @@ -34,9 +39,7 @@ def lint(session):
session.run(
"black",
"--check",
"google",
"tests",
"docs",
*BLACK_PATHS,
)
session.run("flake8", "google", "tests")

Expand All @@ -54,9 +57,7 @@ def blacken(session):
session.install("black")
session.run(
"black",
"google",
"tests",
"docs",
*BLACK_PATHS,
)


Expand Down