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:
parent
44a2351731
commit
3ee9ebb091
2
black.py
2
black.py
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user