mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-18 09:55:59 +08:00
Stubtest fixes (#5391)
This commit is contained in:
@@ -7,5 +7,5 @@ class struct_group(NamedTuple):
|
||||
gr_mem: List[str]
|
||||
|
||||
def getgrall() -> List[struct_group]: ...
|
||||
def getgrgid(gid: int) -> struct_group: ...
|
||||
def getgrgid(id: int) -> struct_group: ...
|
||||
def getgrnam(name: str) -> struct_group: ...
|
||||
|
||||
@@ -768,7 +768,13 @@ def getnameinfo(sockaddr: Union[Tuple[str, int], Tuple[str, int, int, int]], fla
|
||||
def getprotobyname(protocolname: str) -> int: ...
|
||||
def getservbyname(servicename: str, protocolname: str = ...) -> int: ...
|
||||
def getservbyport(port: int, protocolname: str = ...) -> str: ...
|
||||
def socketpair(family: int = ..., type: int = ..., proto: int = ...) -> Tuple[socket, socket]: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
def socketpair(family: int = ..., type: int = ..., proto: int = ...) -> Tuple[socket, socket]: ...
|
||||
|
||||
else:
|
||||
def socketpair(family: Optional[int] = ..., type: int = ..., proto: int = ...) -> Tuple[socket, socket]: ...
|
||||
|
||||
def ntohl(x: int) -> int: ... # param & ret val are 32-bit ints
|
||||
def ntohs(x: int) -> int: ... # param & ret val are 16-bit ints
|
||||
def htonl(x: int) -> int: ... # param & ret val are 32-bit ints
|
||||
|
||||
@@ -12,4 +12,4 @@ class struct_spwd(NamedTuple):
|
||||
sp_flag: int
|
||||
|
||||
def getspall() -> List[struct_spwd]: ...
|
||||
def getspnam(name: str) -> struct_spwd: ...
|
||||
def getspnam(__arg: str) -> struct_spwd: ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import ssl
|
||||
import sys
|
||||
from email.message import Message
|
||||
from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol
|
||||
from http.cookiejar import CookieJar
|
||||
@@ -38,12 +39,22 @@ def urlopen(
|
||||
) -> _UrlopenRet: ...
|
||||
def install_opener(opener: OpenerDirector) -> None: ...
|
||||
def build_opener(*handlers: Union[BaseHandler, Callable[[], BaseHandler]]) -> OpenerDirector: ...
|
||||
def url2pathname(pathname: str) -> str: ...
|
||||
def pathname2url(pathname: str) -> str: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
from nturl2path import pathname2url as pathname2url, url2pathname as url2pathname
|
||||
else:
|
||||
def url2pathname(pathname: str) -> str: ...
|
||||
def pathname2url(pathname: str) -> str: ...
|
||||
|
||||
def getproxies() -> Dict[str, str]: ...
|
||||
def parse_http_list(s: str) -> List[str]: ...
|
||||
def parse_keqv_list(l: List[str]) -> Dict[str, str]: ...
|
||||
def proxy_bypass(host: str) -> Any: ... # Undocumented
|
||||
|
||||
if sys.platform == "win32" or sys.platform == "darwin":
|
||||
def proxy_bypass(host: str) -> Any: ... # Undocumented
|
||||
|
||||
else:
|
||||
def proxy_bypass(host: str, proxies: Optional[Mapping[str, str]] = ...) -> Any: ... # Undocumented
|
||||
|
||||
class Request:
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user