mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-28 22:02:24 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import Self, StrPath
|
||||
from typing import Any, AsyncIterator, Awaitable, Callable, Iterable, Sequence
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import events, protocols, transports
|
||||
from .base_events import Server
|
||||
@@ -64,7 +65,7 @@ else:
|
||||
"start_unix_server",
|
||||
]
|
||||
|
||||
_ClientConnectedCallback = Callable[[StreamReader, StreamWriter], Awaitable[None] | None]
|
||||
_ClientConnectedCallback: TypeAlias = Callable[[StreamReader, StreamWriter], Awaitable[None] | None]
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
class IncompleteReadError(EOFError):
|
||||
|
||||
Reference in New Issue
Block a user