From e011adf023608299a77728adbc80bd89fa99bc9d Mon Sep 17 00:00:00 2001 From: Jesaja Everling Date: Tue, 30 May 2017 16:08:14 +0200 Subject: [PATCH] Using only .py files from git index --- src/flake8/main/git.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/flake8/main/git.py b/src/flake8/main/git.py index 57701f6..d72e041 100644 --- a/src/flake8/main/git.py +++ b/src/flake8/main/git.py @@ -161,7 +161,9 @@ def find_modified_files(lazy): diff_index = piped_process(diff_index_cmd) (stdout, _) = diff_index.communicate() stdout = to_text(stdout) - return stdout.splitlines() + modified_files = stdout.splitlines() + py_files = (x for x in modified_files if x.endswith('.py')) + return py_files def get_staged_contents_from(filename):