Skip to content

Commit 74ecce5

Browse files
authored
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.
1 parent 7d77e9c commit 74ecce5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

stdlib/socket.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,5 @@ if sys.version_info >= (3, 8):
619619

620620
# the 5th tuple item is an address
621621
def getaddrinfo(
622-
host: bytearray | bytes | str | None,
623-
port: str | int | None,
624-
family: int = ...,
625-
type: int = ...,
626-
proto: int = ...,
627-
flags: int = ...,
622+
host: bytes | str | None, port: str | int | None, family: int = ..., type: int = ..., proto: int = ..., flags: int = ...
628623
) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int]]]: ...

0 commit comments

Comments
 (0)