mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Fix urlunparse stubs for 2.7 to correctly support a list/iterator argument.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Stubs for urlparse (Python 2)
|
||||
|
||||
from typing import Dict, List, NamedTuple, Tuple
|
||||
from typing import Dict, List, NamedTuple, Tuple, Sequence, overload
|
||||
|
||||
uses_relative = [] # type: List[str]
|
||||
uses_netloc = [] # type: List[str]
|
||||
@@ -36,8 +36,14 @@ class ParseResult(NamedTuple('ParseResult', [
|
||||
|
||||
def urlparse(url: str, scheme: str = ..., allow_fragments: bool = ...) -> ParseResult: ...
|
||||
def urlsplit(url: str, scheme: str = ..., allow_fragments: bool = ...) -> SplitResult: ...
|
||||
@overload
|
||||
def urlunparse(data: Tuple[str, str, str, str, str, str]) -> str: ...
|
||||
@overload
|
||||
def urlunparse(data: Sequence[str]) -> str: ...
|
||||
@overload
|
||||
def urlunsplit(data: Tuple[str, str, str, str, str]) -> str: ...
|
||||
@overload
|
||||
def urlunsplit(data: Sequence[str]) -> str: ...
|
||||
def urljoin(base: str, url: str, allow_fragments: bool = ...) -> str: ...
|
||||
def urldefrag(url: str) -> str: ...
|
||||
def unquote(s: str) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user