summaryrefslogtreecommitdiffstats
path: root/run_tests
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2023-09-01 13:58:46 -0400
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-09-01 18:08:58 +0000
commitb861511db919b93483b69136fd0f2c6ddab6b4ea (patch)
treef8f584f5a6a18e54e4d95844de5ac1fa6f18b8c4 /run_tests
parente914ec293a414dc6cf092c1323c1c059943e706f (diff)
downloadgit-repo-b861511db919b93483b69136fd0f2c6ddab6b4ea.tar.gz
fix black formatting of standalone programs
Black will only check .py files when given a dir and --check, so list our few standalone programs explicitly. This causes the repo launcher to be reformatted since it was missed in the previous mass reformat. Bug: b/267675342 Change-Id: Ic90a7f5d84fc02e9fccb05945310fd067e2ed764 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/385034 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'run_tests')
-rwxr-xr-xrun_tests10
1 files changed, 9 insertions, 1 deletions
diff --git a/run_tests b/run_tests
index d61308f6..7307f827 100755
--- a/run_tests
+++ b/run_tests
@@ -27,8 +27,16 @@ ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
27 27
28def run_black(): 28def run_black():
29 """Returns the exit code from black.""" 29 """Returns the exit code from black."""
30 # Black by default only matches .py files. We have to list standalone
31 # scripts manually.
32 extra_programs = [
33 "repo",
34 "run_tests",
35 "release/update-manpages",
36 ]
30 return subprocess.run( 37 return subprocess.run(
31 [sys.executable, "-m", "black", "--check", ROOT_DIR], check=False 38 [sys.executable, "-m", "black", "--check", ROOT_DIR] + extra_programs,
39 check=False,
32 ).returncode 40 ).returncode
33 41
34 42