Fix --check with multiple files (#88)

Passing multiple files to --check would previously result in the report
being printed as if the files had been written to.
This commit is contained in:
Josh Holland 2018-03-29 23:21:18 +01:00 committed by Łukasz Langa
parent 44a2351731
commit 3ee9ebb091

View File

@ -181,7 +181,7 @@ async def schedule_formatting(
} }
await asyncio.wait(tasks.values()) await asyncio.wait(tasks.values())
cancelled = [] cancelled = []
report = Report() report = Report(check=not write_back)
for src, task in tasks.items(): for src, task in tasks.items():
if not task.done(): if not task.done():
report.failed(src, 'timed out, cancelling') report.failed(src, 'timed out, cancelling')