X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/62ed5389fca51384721245ff1c2f1c62a13a04ff..9afffacaa0e5ac911f9feacb916bc48473dcb117:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index 5c6cb67..c503c1a 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -763,7 +763,10 @@ async def schedule_formatting( sources_to_cache.append(src) report.done(src, changed) if cancelled: - await asyncio.gather(*cancelled, loop=loop, return_exceptions=True) + if sys.version_info >= (3, 7): + await asyncio.gather(*cancelled, return_exceptions=True) + else: + await asyncio.gather(*cancelled, loop=loop, return_exceptions=True) if sources_to_cache: write_cache(cache, sources_to_cache, mode)