mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-13 16:14:18 +00:00
Change how we initialize our git hook application
Look for configuration files in the current directory while checking the files in the temporary directory. Closes #210 Closes #223
This commit is contained in:
parent
c2ef3c2ce0
commit
7320cce02b
1 changed files with 2 additions and 2 deletions
|
|
@ -41,8 +41,8 @@ def hook(lazy=False, strict=False):
|
||||||
app = application.Application()
|
app = application.Application()
|
||||||
with make_temporary_directory() as tempdir:
|
with make_temporary_directory() as tempdir:
|
||||||
filepaths = list(copy_indexed_files_to(tempdir, lazy))
|
filepaths = list(copy_indexed_files_to(tempdir, lazy))
|
||||||
app.initialize(filepaths)
|
app.initialize(['.'])
|
||||||
app.run_checks()
|
app.run_checks(filepaths)
|
||||||
|
|
||||||
app.report_errors()
|
app.report_errors()
|
||||||
if strict:
|
if strict:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue