From bc0de6ee2489da6fb8eafd021a8c58b5cc30c947 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 10 Nov 2021 20:07:36 -0500 Subject: [PATCH] chore(python): run blacken session for all directories with a noxfile (#1276) --- synthtool/languages/python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synthtool/languages/python.py b/synthtool/languages/python.py index 9eb627379..23f244b5c 100644 --- a/synthtool/languages/python.py +++ b/synthtool/languages/python.py @@ -192,7 +192,9 @@ def owlbot_main() -> None: py_samples(skip_readmes=True) - s.shell.run(["nox", "-s", "blacken"], hide_output=False) + # run blacken session for all directories which a noxfile + for noxfile in Path(".").glob("**/noxfile.py"): + s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) if __name__ == "__main__":