Fix mypy errors. (#911)

This commit is contained in:
Brandt Bucher 2019-06-25 09:44:12 -07:00 committed by Jelle Zijlstra
parent 7c556faf5f
commit 9d9f96a7b4

View File

@ -1,5 +1,4 @@
import asyncio import asyncio
from asyncio.base_events import BaseEventLoop
from concurrent.futures import Executor, ProcessPoolExecutor from concurrent.futures import Executor, ProcessPoolExecutor
from datetime import datetime from datetime import datetime
from enum import Enum from enum import Enum
@ -532,7 +531,7 @@ async def schedule_formatting(
write_back: WriteBack, write_back: WriteBack,
mode: FileMode, mode: FileMode,
report: "Report", report: "Report",
loop: BaseEventLoop, loop: asyncio.AbstractEventLoop,
executor: Executor, executor: Executor,
) -> None: ) -> None:
"""Run formatting of `sources` in parallel using the provided `executor`. """Run formatting of `sources` in parallel using the provided `executor`.
@ -3599,7 +3598,7 @@ def cancel(tasks: Iterable[asyncio.Task]) -> None:
task.cancel() 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.""" """Cancel all pending tasks on `loop`, wait for them, and close the loop."""
try: try:
if sys.version_info[:2] >= (3, 7): if sys.version_info[:2] >= (3, 7):