Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood authored and GitHub committed 2021-12-28 11:31:43 +01:00
1 parent e6cb341d94
commit 8d5d2520ac
237 files changed
+966 -1069

No files matched your search

+3 -3
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"