simplify typing

This commit is contained in:
Will McGugan
2023-02-07 11:58:55 +00:00
parent ad2f3697af
commit 7e7367f8f6
2 changed files with 3 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ if sys.version_info >= (3, 8):
else:
import asyncio
from asyncio import create_task as _create_task
from typing_extensions import Awaitable
from typing import Awaitable
def create_task(coroutine: Awaitable, *, name: str | None = None) -> asyncio.Task:
"""Schedule the execution of a coroutine object in a spawn task."""

View File

@@ -1,9 +1,8 @@
from typing import Callable, List, Union
from typing import Awaitable, TYPE_CHECKING
from typing import TYPE_CHECKING, Awaitable, Callable, List, Union
from typing_extensions import Protocol
from rich.segment import Segment
if TYPE_CHECKING:
from .message import Message