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.
This commit is contained in:
Alex Waygood
2022-03-21 00:35:03 +01:00
committed by GitHub
parent 7d77e9c5c1
commit 74ecce5b68

View File

@@ -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]]]: ...