mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
make sure skip_warning works with no files
This commit is contained in:
parent
b97f9f542d
commit
7beb6d3845
1 changed files with 2 additions and 0 deletions
|
|
@ -118,6 +118,8 @@ def git_hook(complexity=-1, strict=False):
|
|||
ext = os.path.splitext(filename)[-1]
|
||||
if ext != '.py':
|
||||
continue
|
||||
if not os.path.exists(filename):
|
||||
continue
|
||||
warnings += check_file(filename, complexity)
|
||||
|
||||
if strict:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue