diff --git a/noxfile.py b/noxfile.py index d9883d069..0b0800d35 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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"] diff --git a/owlbot.py b/owlbot.py index 4d287ac46..b887449ff 100644 --- a/owlbot.py +++ b/owlbot.py @@ -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): @@ -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) \ No newline at end of file