-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
drop union return type from getaddrinfo #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
stdlib/2/socket.pyi
Outdated
def getaddrinfo( | ||
host: Optional[str], port: Union[str, int, None], family: int = ..., | ||
socktype: int = ..., proto: int = ..., | ||
flags: int = ...) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]: | ||
flags: int = ...) -> List[Tuple[int, int, int, str, Tuple[Any]]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should rather be Tuple[Any, ...]
.
stdlib/3.4/asyncio/events.pyi
Outdated
def getaddrinfo(self, host: str, port: int, *, | ||
family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> Generator[Any, None, List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]]: ... | ||
family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> Generator[Any, None, List[Tuple[int, int, int, str, Tuple[Any]]]]: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
stdlib/3/socket.pyi
Outdated
def getaddrinfo( | ||
host: Optional[str], port: Union[str, int, None], family: int = ..., | ||
socktype: int = ..., proto: int = ..., | ||
flags: int = ...) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]: | ||
flags: int = ...) -> List[Tuple[int, int, int, str, Tuple[Any]]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Still breaks...
|
With |
sorry for not testing properly :(
Try again with three dots. Then sit back, relax, wait three minutes, run the test against crawl.py and crawl2.py, then push. :-) |
I tested it
As discussed in #958. I added references to the related mypy issue, python/mypy#2509.