mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add missing members for AbstractBasicAuthHandler class (#5379)
* Add missing members for AbstractBasicAuthHandler class Signed-off-by: Harmouch101 <mahmoudddharmouchhh@gmail.com> * Added missing functions to ftpwrapper Signed-off-by: Harmouch101 <mahmoudddharmouchhh@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ from typing import (
|
||||
overload,
|
||||
)
|
||||
from urllib.error import HTTPError
|
||||
from urllib.response import addinfourl
|
||||
from urllib.response import addclosehook, addinfourl
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_UrlopenRet = Any
|
||||
@@ -155,6 +155,8 @@ class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
|
||||
class AbstractBasicAuthHandler:
|
||||
rx: ClassVar[Pattern[str]] # undocumented
|
||||
passwd: HTTPPasswordMgr
|
||||
add_password: Callable[[str, Union[str, Sequence[str]], str, str], None]
|
||||
def __init__(self, password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ...
|
||||
def http_error_auth_reqed(self, authreq: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ...
|
||||
def http_request(self, req: Request) -> Request: ... # undocumented
|
||||
@@ -227,6 +229,12 @@ class ftpwrapper: # undocumented
|
||||
def __init__(
|
||||
self, user: str, passwd: str, host: str, port: int, dirs: str, timeout: Optional[float] = ..., persistent: bool = ...
|
||||
) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def endtransfer(self) -> None: ...
|
||||
def file_close(self) -> None: ...
|
||||
def init(self) -> None: ...
|
||||
def real_close(self) -> None: ...
|
||||
def retrfile(self, file: str, type: str) -> Tuple[addclosehook, int]: ...
|
||||
|
||||
class FTPHandler(BaseHandler):
|
||||
def ftp_open(self, req: Request) -> addinfourl: ...
|
||||
|
||||
Reference in New Issue
Block a user