Skip to content

Commit

Permalink
fix: sync python_samples black version with python_library (#1158)
Browse files Browse the repository at this point in the history
Fixes #1157
  • Loading branch information
tswast committed Jul 15, 2021
1 parent 5d3c52f commit 4124d24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synthtool/gcp/templates/python_samples/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import nox
# WARNING - WARNING - WARNING - WARNING - WARNING
# WARNING - WARNING - WARNING - WARNING - WARNING

# Copy `noxfile_config.py` to your directory and modify it instead.
BLACK_VERSION = "black==19.10b0"

# Copy `noxfile_config.py` to your directory and modify it instead.

# `TEST_CONFIG` dict is a configuration hook that allows users to
# modify the test configurations. The values here should be in sync
Expand Down Expand Up @@ -159,7 +160,7 @@ def lint(session: nox.sessions.Session) -> None:

@nox.session
def blacken(session: nox.sessions.Session) -> None:
session.install("black")
session.install(BLACK_VERSION)
python_files = [path for path in os.listdir(".") if path.endswith(".py")]

session.run("black", *python_files)
Expand Down

0 comments on commit 4124d24

Please sign in to comment.