diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2021-12-15 11:46:07 +0100 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2021-12-15 11:46:07 +0100 |
| commit | ff2f4d4c4986bffbc5348a197396e11bef057346 (patch) | |
| tree | ec673f29b1a18be6313a73ce642e68266a6aee93 /scripts/internal/git_pre_commit.py | |
| parent | ebbaae8d1f42f051282af79d60f19cb1161088a5 (diff) | |
| download | psutil-ff2f4d4c4986bffbc5348a197396e11bef057346.tar.gz | |
assert scripts have +x bit
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Diffstat (limited to 'scripts/internal/git_pre_commit.py')
| -rwxr-xr-x | scripts/internal/git_pre_commit.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/internal/git_pre_commit.py b/scripts/internal/git_pre_commit.py index dca17ffb..c6f223bb 100755 --- a/scripts/internal/git_pre_commit.py +++ b/scripts/internal/git_pre_commit.py @@ -13,6 +13,7 @@ the files which were modified in the commit. Checks: - assert not pdb.set_trace in code - assert no bare except clause ("except:") in code - assert "flake8" checks pass +- assert "isort" checks pass - assert C linter checks pass - abort if files were added/renamed/removed and MANIFEST.in was not updated @@ -124,7 +125,7 @@ def main(): cmd = "%s -m flake8 --config=.flake8 %s" % (PYTHON, " ".join(py_files)) ret = subprocess.call(shlex.split(cmd)) if ret != 0: - return exit("python code is not flake8 compliant; " + return exit("python code didn't pass 'flake8' style check; " "try running 'make fix-flake8'") # isort assert os.path.exists('.isort.cfg') @@ -132,7 +133,7 @@ def main(): PYTHON, " ".join(py_files)) ret = subprocess.call(shlex.split(cmd)) if ret != 0: - return exit("python code is not flake8 compliant; " + return exit("python code didn't pass 'isort' style check; " "try running 'make fix-imports'") # C linter if c_files: |
