Commits

smokey42  committed 4d7f9df

git_hook: Only check staged changes for compliance

  • Participants
  • Parent commits 3a3792f

Comments (0)

Files changed (1)

File flake8/run.py

     _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':