From 74ecce5b68cbcfe0a34a1dee20a895ffc72c4553 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 21 Mar 2022 00:35:03 +0100 Subject: [PATCH] Improve `host` parameter of `socket.getaddrinfo()` (#7518) As pointed out by @srittau in #7517, `bytearray` [is redundant](https://docs.python.org/3/library/typing.html#typing.ByteString) in a union where `bytes` is also in the union. --- stdlib/socket.pyi | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/stdlib/socket.pyi b/stdlib/socket.pyi index 461ea4140..7801940f8 100644 --- a/stdlib/socket.pyi +++ b/stdlib/socket.pyi @@ -619,10 +619,5 @@ if sys.version_info >= (3, 8): # the 5th tuple item is an address def getaddrinfo( - host: bytearray | bytes | str | None, - port: str | int | None, - family: int = ..., - type: int = ..., - proto: int = ..., - flags: int = ..., + host: bytes | str | None, port: str | int | None, family: int = ..., type: int = ..., proto: int = ..., flags: int = ... ) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int]]]: ...