mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 21:44:18 +00:00
Using only .py files from git index
This commit is contained in:
parent
68c6577564
commit
e011adf023
1 changed files with 3 additions and 1 deletions
|
|
@ -161,7 +161,9 @@ def find_modified_files(lazy):
|
||||||
diff_index = piped_process(diff_index_cmd)
|
diff_index = piped_process(diff_index_cmd)
|
||||||
(stdout, _) = diff_index.communicate()
|
(stdout, _) = diff_index.communicate()
|
||||||
stdout = to_text(stdout)
|
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):
|
def get_staged_contents_from(filename):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue