Enable flake8-pyi's Y037 (#9686)

This commit is contained in:
Alex Waygood
2023-02-07 03:01:02 +00:00
committed by GitHub
parent c4c4bee8aa
commit 0ef9c3f8e8
38 changed files with 119 additions and 201 deletions

View File

@@ -4,7 +4,7 @@ from _socket import _Address, _RetAddress
from _typeshed import ReadableBuffer, Self
from collections.abc import Callable
from socket import socket as _socket
from typing import Any, BinaryIO, ClassVar, Union
from typing import Any, BinaryIO, ClassVar
from typing_extensions import TypeAlias
__all__ = [
@@ -29,7 +29,7 @@ if sys.platform != "win32":
"UnixStreamServer",
]
_RequestType: TypeAlias = Union[_socket, tuple[bytes, _socket]]
_RequestType: TypeAlias = _socket | tuple[bytes, _socket]
_AfUnixAddress: TypeAlias = str | ReadableBuffer # adddress acceptable for an AF_UNIX socket
_AfInetAddress: TypeAlias = tuple[str | bytes | bytearray, int] # address acceptable for an AF_INET socket