mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 19:01:15 +08:00
Use lowercase tuple where possible (#6170)
This commit is contained in:
@@ -77,11 +77,11 @@ class Request:
|
||||
def get_header(self, header_name: str) -> str | None: ...
|
||||
@overload
|
||||
def get_header(self, header_name: str, default: _T) -> str | _T: ...
|
||||
def header_items(self) -> list[Tuple[str, str]]: ...
|
||||
def header_items(self) -> list[tuple[str, str]]: ...
|
||||
def has_proxy(self) -> bool: ...
|
||||
|
||||
class OpenerDirector:
|
||||
addheaders: list[Tuple[str, str]]
|
||||
addheaders: list[tuple[str, str]]
|
||||
def add_handler(self, handler: BaseHandler) -> None: ...
|
||||
def open(self, fullurl: str | Request, data: bytes | None = ..., timeout: float | None = ...) -> _UrlopenRet: ...
|
||||
def error(self, proto: str, *args: Any) -> _UrlopenRet: ...
|
||||
@@ -125,13 +125,13 @@ class ProxyHandler(BaseHandler):
|
||||
|
||||
class HTTPPasswordMgr:
|
||||
def add_password(self, realm: str, uri: str | Sequence[str], user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: str, authuri: str) -> Tuple[str | None, str | None]: ...
|
||||
def find_user_password(self, realm: str, authuri: str) -> tuple[str | None, str | None]: ...
|
||||
def is_suburi(self, base: str, test: str) -> bool: ... # undocumented
|
||||
def reduce_uri(self, uri: str, default_port: bool = ...) -> str: ... # undocumented
|
||||
|
||||
class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
|
||||
def add_password(self, realm: str | None, uri: str | Sequence[str], user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: str | None, authuri: str) -> Tuple[str | None, str | None]: ...
|
||||
def find_user_password(self, realm: str | None, authuri: str) -> tuple[str | None, str | None]: ...
|
||||
|
||||
class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
def add_password(
|
||||
@@ -167,7 +167,7 @@ class AbstractDigestAuthHandler:
|
||||
def retry_http_digest_auth(self, req: Request, auth: str) -> _UrlopenRet | None: ...
|
||||
def get_cnonce(self, nonce: str) -> str: ...
|
||||
def get_authorization(self, req: Request, chal: Mapping[str, str]) -> str: ...
|
||||
def get_algorithm_impls(self, algorithm: str) -> Tuple[Callable[[str], str], Callable[[str, str], str]]: ...
|
||||
def get_algorithm_impls(self, algorithm: str) -> tuple[Callable[[str], str], Callable[[str, str], str]]: ...
|
||||
def get_entity_digest(self, data: bytes | None, chal: Mapping[str, str]) -> str | None: ...
|
||||
|
||||
class HTTPDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
|
||||
@@ -213,7 +213,7 @@ class ftpwrapper: # undocumented
|
||||
def file_close(self) -> None: ...
|
||||
def init(self) -> None: ...
|
||||
def real_close(self) -> None: ...
|
||||
def retrfile(self, file: str, type: str) -> Tuple[addclosehook, int]: ...
|
||||
def retrfile(self, file: str, type: str) -> tuple[addclosehook, int]: ...
|
||||
|
||||
class FTPHandler(BaseHandler):
|
||||
def ftp_open(self, req: Request) -> addinfourl: ...
|
||||
@@ -242,7 +242,7 @@ def urlretrieve(
|
||||
filename: StrOrBytesPath | None = ...,
|
||||
reporthook: Callable[[int, int, int], None] | None = ...,
|
||||
data: bytes | None = ...,
|
||||
) -> Tuple[str, HTTPMessage]: ...
|
||||
) -> tuple[str, HTTPMessage]: ...
|
||||
def urlcleanup() -> None: ...
|
||||
|
||||
class URLopener:
|
||||
@@ -256,8 +256,8 @@ class URLopener:
|
||||
filename: str | None = ...,
|
||||
reporthook: Callable[[int, int, int], None] | None = ...,
|
||||
data: bytes | None = ...,
|
||||
) -> Tuple[str, Message | None]: ...
|
||||
def addheader(self, *args: Tuple[str, str]) -> None: ... # undocumented
|
||||
) -> tuple[str, Message | None]: ...
|
||||
def addheader(self, *args: tuple[str, str]) -> None: ... # undocumented
|
||||
def cleanup(self) -> None: ... # undocumented
|
||||
def close(self) -> None: ... # undocumented
|
||||
def http_error(
|
||||
@@ -275,8 +275,8 @@ class URLopener:
|
||||
def open_unknown_proxy(self, proxy: str, fullurl: str, data: bytes | None = ...) -> None: ... # undocumented
|
||||
|
||||
class FancyURLopener(URLopener):
|
||||
def prompt_user_passwd(self, host: str, realm: str) -> Tuple[str, str]: ...
|
||||
def get_user_passwd(self, host: str, realm: str, clear_cache: int = ...) -> Tuple[str, str]: ... # undocumented
|
||||
def prompt_user_passwd(self, host: str, realm: str) -> tuple[str, str]: ...
|
||||
def get_user_passwd(self, host: str, realm: str, clear_cache: int = ...) -> tuple[str, str]: ... # undocumented
|
||||
def http_error_301(
|
||||
self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: bytes | None = ...
|
||||
) -> _UrlopenRet | addinfourl | None: ... # undocumented
|
||||
|
||||
Reference in New Issue
Block a user