X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/fac498bf31af509e0f62bf61459014c9a4e094a1..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)