mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-07 02:10:59 +08:00
@@ -109,19 +109,14 @@ def urldefrag(url: str) -> DefragResult: ...
|
||||
@overload
|
||||
def urldefrag(url: bytes) -> DefragResultBytes: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
def urlencode(query: Union[Mapping[Any, Any],
|
||||
Mapping[Any, Sequence[Any]],
|
||||
Sequence[Tuple[Any, Any]],
|
||||
Sequence[Tuple[Any, Sequence[Any]]]],
|
||||
doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ...,
|
||||
quote_via: Callable[[str, AnyStr, str, str], str] = ...) -> str: ...
|
||||
else:
|
||||
def urlencode(query: Union[Mapping[Any, Any],
|
||||
Mapping[Any, Sequence[Any]],
|
||||
Sequence[Tuple[Any, Any]],
|
||||
Sequence[Tuple[Any, Sequence[Any]]]],
|
||||
doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...
|
||||
def urlencode(
|
||||
query: Union[Mapping[Any, Any], Mapping[Any, Sequence[Any]], Sequence[Tuple[Any, Any]], Sequence[Tuple[Any, Sequence[Any]]]],
|
||||
doseq: bool = ...,
|
||||
safe: AnyStr = ...,
|
||||
encoding: str = ...,
|
||||
errors: str = ...,
|
||||
quote_via: Callable[[str, AnyStr, str, str], str] = ...,
|
||||
) -> str: ...
|
||||
|
||||
def urljoin(base: AnyStr, url: Optional[AnyStr], allow_fragments: bool = ...) -> AnyStr: ...
|
||||
|
||||
|
||||
@@ -115,14 +115,17 @@ class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
|
||||
user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: str, authuri: str) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
def add_password(self, realm: str, uri: Union[str, Sequence[str]],
|
||||
user: str, passwd: str,
|
||||
is_authenticated: bool = ...) -> None: ...
|
||||
def update_authenticated(self, uri: Union[str, Sequence[str]],
|
||||
is_authenticated: bool = ...) -> None: ...
|
||||
def is_authenticated(self, authuri: str) -> bool: ...
|
||||
class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
def add_password(
|
||||
self,
|
||||
realm: str,
|
||||
uri: Union[str, Sequence[str]],
|
||||
user: str,
|
||||
passwd: str,
|
||||
is_authenticated: bool = ...,
|
||||
) -> None: ...
|
||||
def update_authenticated(self, uri: Union[str, Sequence[str]], is_authenticated: bool = ...) -> None: ...
|
||||
def is_authenticated(self, authuri: str) -> bool: ...
|
||||
|
||||
class AbstractBasicAuthHandler:
|
||||
def __init__(self,
|
||||
|
||||
Reference in New Issue
Block a user