Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -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"