X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8f380911e0cd8057bd9a1f0c418d81195ce858a3..7d213c6d4364a1bc3886f3253a7417c7b36f01a3:/black.py?ds=sidebyside diff --git a/black.py b/black.py index ce27653..97393e1 100644 --- a/black.py +++ b/black.py @@ -1,5 +1,4 @@ import asyncio -from asyncio.base_events import BaseEventLoop from concurrent.futures import Executor, ProcessPoolExecutor from datetime import datetime from enum import Enum @@ -532,14 +531,14 @@ async def schedule_formatting( write_back: WriteBack, mode: FileMode, report: "Report", - loop: BaseEventLoop, + loop: asyncio.AbstractEventLoop, executor: Executor, ) -> None: """Run formatting of `sources` in parallel using the provided `executor`. (Use ProcessPoolExecutors for actual parallelism.) - `line_length`, `write_back`, `fast`, and `pyi` options are passed to + `write_back`, `fast`, and `mode` options are passed to :func:`format_file_in_place`. """ cache: Cache = {} @@ -3599,7 +3598,7 @@ def cancel(tasks: Iterable[asyncio.Task]) -> None: task.cancel() -def shutdown(loop: BaseEventLoop) -> None: +def shutdown(loop: asyncio.AbstractEventLoop) -> None: """Cancel all pending tasks on `loop`, wait for them, and close the loop.""" try: if sys.version_info[:2] >= (3, 7):