diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2022-05-25 15:34:10 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2022-05-25 15:34:10 +0200 |
commit | 4f053312934cdca739c3fefe4ada8a4f2d096bdd (patch) | |
tree | 2d6d7640fd5882bb1497b9793475dafcb70bac37 /scripts/internal/git_pre_commit.py | |
parent | 54c0648bd1d7552d27c577d65f70c25023001071 (diff) | |
download | psutil-4f053312934cdca739c3fefe4ada8a4f2d096bdd.tar.gz |
add flake8-debugger plugin to detect pdb/set_trace() lines
Diffstat (limited to 'scripts/internal/git_pre_commit.py')
-rwxr-xr-x | scripts/internal/git_pre_commit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/internal/git_pre_commit.py b/scripts/internal/git_pre_commit.py index c86c9f93..46b3bc53 100755 --- a/scripts/internal/git_pre_commit.py +++ b/scripts/internal/git_pre_commit.py @@ -109,10 +109,10 @@ def main(): print("%s:%s %r" % (path, lineno, line)) return exit("space at end of line") line = line.rstrip() - # pdb - if "pdb.set_trace" in line: - print("%s:%s %s" % (path, lineno, line)) - return exit("you forgot a pdb in your python code") + # # pdb (now provided by flake8-debugger plugin) + # if "pdb.set_trace" in line: + # print("%s:%s %s" % (path, lineno, line)) + # return exit("you forgot a pdb in your python code") # # bare except clause (now provided by flake8-blind-except plugin) # if "except:" in line and not line.endswith("# NOQA"): # print("%s:%s %s" % (path, lineno, line)) |