mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Fix unsound return type hints in urllib module (#10470)
* Fix unsound return type hints in urllib module Closes #10466 * Fix return type of ftplib.FTP.ntransfercmd Related to #10466
This commit is contained in:
@@ -173,7 +173,7 @@ 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 is_suburi(self, base: str, test: str) -> bool: ... # undocumented
|
||||
def reduce_uri(self, uri: str, default_port: bool = True) -> str: ... # undocumented
|
||||
def reduce_uri(self, uri: str, default_port: bool = True) -> tuple[str, str]: ... # undocumented
|
||||
|
||||
class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
|
||||
def add_password(self, realm: str | None, uri: str | Sequence[str], user: str, passwd: str) -> None: ...
|
||||
@@ -184,7 +184,7 @@ class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
self, realm: str | None, uri: str | Sequence[str], user: str, passwd: str, is_authenticated: bool = False
|
||||
) -> None: ...
|
||||
def update_authenticated(self, uri: str | Sequence[str], is_authenticated: bool = False) -> None: ...
|
||||
def is_authenticated(self, authuri: str) -> bool: ...
|
||||
def is_authenticated(self, authuri: str) -> bool | None: ...
|
||||
|
||||
class AbstractBasicAuthHandler:
|
||||
rx: ClassVar[Pattern[str]] # undocumented
|
||||
@@ -212,7 +212,7 @@ class AbstractDigestAuthHandler:
|
||||
def http_error_auth_reqed(self, auth_header: str, host: str, req: Request, headers: HTTPMessage) -> None: ...
|
||||
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_authorization(self, req: Request, chal: Mapping[str, str]) -> str | None: ...
|
||||
def get_algorithm_impls(self, algorithm: str) -> tuple[Callable[[str], str], Callable[[str, str], str]]: ...
|
||||
def get_entity_digest(self, data: ReadableBuffer | None, chal: Mapping[str, str]) -> str | None: ...
|
||||
|
||||
@@ -269,7 +269,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 | None]: ...
|
||||
|
||||
class FTPHandler(BaseHandler):
|
||||
def ftp_open(self, req: Request) -> addinfourl: ...
|
||||
|
||||
Reference in New Issue
Block a user