Skip to content

Commit

Permalink
chore: updates blacken process to ensure all samples are processed (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chalmerlowe authored Sep 28, 2022
1 parent 2c57533 commit e11a75a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@
MYPY_VERSION = "mypy==0.910"
PYTYPE_VERSION = "pytype==2021.4.9"
BLACK_VERSION = "black==22.3.0"
BLACK_PATHS = ("docs", "google", "samples", "tests", "noxfile.py", "setup.py")
BLACK_PATHS = (
"docs",
"google",
"samples",
"samples/tests",
"tests",
"noxfile.py",
"setup.py",
)

DEFAULT_PYTHON_VERSION = "3.8"
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.10"]
Expand Down
7 changes: 6 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
# limitations under the License.

"""This script is used to synthesize generated parts of this library."""
from pathlib import Path
import textwrap

import synthtool as s
from synthtool import gcp
from synthtool.languages import python

REPO_ROOT = Path(__file__).parent.absolute()

default_version = "v2"

for library in s.get_staging_dirs(default_version):
Expand Down Expand Up @@ -120,4 +123,6 @@
),
)

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
# s.shell.run(["nox", "-s", "blacken"], hide_output=False)
for noxfile in REPO_ROOT.glob("samples/**/noxfile.py"):
s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False)

0 comments on commit e11a75a

Please sign in to comment.