diff options
author | Mike Frysinger <vapier@google.com> | 2023-08-21 21:20:32 -0400 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-08-22 18:32:22 +0000 |
commit | 6447733eb28ea188d551ae518a7e51ebf63a4350 (patch) | |
tree | 3e2571b39af0f8544dae4660ebc1d29e2a7bda9d /run_tests | |
parent | 06ddc8c50a7e802dbaf8468144c2b5773cda3714 (diff) | |
download | git-repo-6447733eb28ea188d551ae518a7e51ebf63a4350.tar.gz |
isort: format codebasev2.36
Change-Id: I6f11d123b68fd077f558d3c21349c55c5f251019
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383715
Reviewed-by: Gavin Mak <gavinmak@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'run_tests')
-rwxr-xr-x | run_tests | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -18,6 +18,7 @@ | |||
18 | import os | 18 | import os |
19 | import subprocess | 19 | import subprocess |
20 | import sys | 20 | import sys |
21 | |||
21 | import pytest | 22 | import pytest |
22 | 23 | ||
23 | 24 | ||
@@ -38,12 +39,20 @@ def run_flake8(): | |||
38 | ).returncode | 39 | ).returncode |
39 | 40 | ||
40 | 41 | ||
42 | def run_isort(): | ||
43 | """Returns the exit code from isort.""" | ||
44 | return subprocess.run( | ||
45 | [sys.executable, "-m", "isort", "--check", ROOT_DIR], check=False | ||
46 | ).returncode | ||
47 | |||
48 | |||
41 | def main(argv): | 49 | def main(argv): |
42 | """The main entry.""" | 50 | """The main entry.""" |
43 | checks = ( | 51 | checks = ( |
44 | lambda: pytest.main(argv), | 52 | lambda: pytest.main(argv), |
45 | run_black, | 53 | run_black, |
46 | run_flake8, | 54 | run_flake8, |
55 | run_isort, | ||
47 | ) | 56 | ) |
48 | return 0 if all(not c() for c in checks) else 1 | 57 | return 0 if all(not c() for c in checks) else 1 |
49 | 58 | ||