mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Make the urllib.quote/unquote functions generic (#1891)
When given unicode they will return unicode. Also make 'safe' Text. Fixes #1893.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Mapping, Union, Tuple, Sequence, IO
|
||||
from typing import Any, AnyStr, IO, Mapping, Sequence, Text, Tuple, Union
|
||||
|
||||
def url2pathname(pathname: str) -> str: ...
|
||||
def pathname2url(pathname: str) -> str: ...
|
||||
@@ -119,10 +119,10 @@ def splitquery(url): ...
|
||||
def splittag(url): ...
|
||||
def splitattr(url): ...
|
||||
def splitvalue(attr): ...
|
||||
def unquote(s: str) -> str: ...
|
||||
def unquote_plus(s: str) -> str: ...
|
||||
def quote(s: str, safe=...) -> str: ...
|
||||
def quote_plus(s: str, safe=...) -> str: ...
|
||||
def unquote(s: AnyStr) -> AnyStr: ...
|
||||
def unquote_plus(s: AnyStr) -> AnyStr: ...
|
||||
def quote(s: AnyStr, safe: Text = ...) -> AnyStr: ...
|
||||
def quote_plus(s: AnyStr, safe: Text = ...) -> AnyStr: ...
|
||||
def urlencode(query: Union[Sequence[Tuple[Any, Any]], Mapping[Any, Any]], doseq=...) -> str: ...
|
||||
|
||||
def getproxies() -> Mapping[str, str]: ...
|
||||
|
||||
Reference in New Issue
Block a user