mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-03 19:56:54 +00:00
git_hook: Only check staged changes for compliance
This commit is contained in:
parent
30d3fd0f16
commit
3438b55c1a
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ def git_hook(complexity=-1, strict=False):
|
|||
_initpep8()
|
||||
warnings = 0
|
||||
|
||||
_, files_modified, _ = run("git diff-index --name-only HEAD")
|
||||
_, files_modified, _ = run("git diff-index --cached --name-only HEAD")
|
||||
for filename in files_modified:
|
||||
ext = os.path.splitext(filename)[-1]
|
||||
if ext != '.py':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue