Upgrade to isort 5 (#4323)

This now also reformats imports not at the top of files.
This commit is contained in:
Sebastian Rittau
2020-07-16 16:01:57 +02:00
committed by GitHub
parent 1e0e40f61c
commit 5e76f51930
20 changed files with 67 additions and 55 deletions

View File

@@ -89,13 +89,10 @@ else:
from asyncio.events import SendfileNotAvailableError as SendfileNotAvailableError
from asyncio.futures import (
CancelledError as CancelledError,
TimeoutError as TimeoutError,
InvalidStateError as InvalidStateError,
TimeoutError as TimeoutError,
)
from asyncio.streams import (
IncompleteReadError as IncompleteReadError,
LimitOverrunError as LimitOverrunError,
)
from asyncio.streams import IncompleteReadError as IncompleteReadError, LimitOverrunError as LimitOverrunError
if sys.version_info >= (3, 7):
from asyncio.protocols import BufferedProtocol as BufferedProtocol
@@ -104,11 +101,7 @@ if sys.version_info >= (3, 7):
from asyncio.runners import run as run
if sys.version_info >= (3, 7):
from asyncio.tasks import (
all_tasks as all_tasks,
create_task as create_task,
current_task as current_task,
)
from asyncio.tasks import all_tasks as all_tasks, create_task as create_task, current_task as current_task
if sys.version_info >= (3, 9):
from asyncio.threads import to_thread as to_thread
@@ -117,10 +110,8 @@ if sys.platform == "win32":
from asyncio.windows_events import *
if sys.platform != "win32":
from asyncio.streams import (
open_unix_connection as open_unix_connection,
start_unix_server as start_unix_server,
)
from asyncio.streams import open_unix_connection as open_unix_connection, start_unix_server as start_unix_server
from .unix_events import (
AbstractChildWatcher as AbstractChildWatcher,
FastChildWatcher as FastChildWatcher,

View File

@@ -5,8 +5,7 @@ from typing import Any, Awaitable, Callable, Generator, Iterable, List, Optional
from .events import AbstractEventLoop
if sys.version_info < (3, 8):
from concurrent.futures import CancelledError as CancelledError
from concurrent.futures import TimeoutError as TimeoutError
from concurrent.futures import CancelledError as CancelledError, TimeoutError as TimeoutError
class InvalidStateError(Error): ...
if sys.version_info >= (3, 7):