mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -5,14 +5,14 @@ from _typeshed import Self
|
||||
from socket import socket as _socket
|
||||
from ssl import SSLContext, SSLSocket
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, Callable, List, Pattern, Tuple, Type, Union
|
||||
from typing import IO, Any, Callable, Pattern, Type, Union
|
||||
from typing_extensions import Literal
|
||||
|
||||
# TODO: Commands should use their actual return types, not this type alias.
|
||||
# E.g. Tuple[Literal["OK"], List[bytes]]
|
||||
_CommandResults = Tuple[str, List[Any]]
|
||||
_CommandResults = tuple[str, list[Any]]
|
||||
|
||||
_AnyResponseData = Union[List[None], List[Union[bytes, Tuple[bytes, bytes]]]]
|
||||
_AnyResponseData = Union[list[None], list[Union[bytes, tuple[bytes, bytes]]]]
|
||||
|
||||
_list = list # conflicts with a method named "list"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user