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:
Mahmoud Harmouch
2021-05-09 11:18:24 +03:00
committed by GitHub
parent fcdc7a8135
commit 01ccf25d62

View File

@@ -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: ...