mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
add (overwrite with) mypy stubs, if available
This commit is contained in:
47
stdlib/2.7/urlparse.pyi
Normal file
47
stdlib/2.7/urlparse.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
# Stubs for urlparse (Python 2)
|
||||
|
||||
from typing import List, NamedTuple, Tuple
|
||||
|
||||
uses_relative = [] # type: List[str]
|
||||
uses_netloc = [] # type: List[str]
|
||||
uses_params = [] # type: List[str]
|
||||
non_hierarchical = [] # type: List[str]
|
||||
uses_query = [] # type: List[str]
|
||||
uses_fragment = [] # type: List[str]
|
||||
scheme_chars = ''
|
||||
MAX_CACHE_SIZE = 0
|
||||
|
||||
def clear_cache() -> None: ...
|
||||
|
||||
class ResultMixin(object):
|
||||
@property
|
||||
def username(self) -> str: ...
|
||||
@property
|
||||
def password(self) -> str: ...
|
||||
@property
|
||||
def hostname(self) -> str: ...
|
||||
@property
|
||||
def port(self) -> int: ...
|
||||
|
||||
class SplitResult(NamedTuple('SplitResult', [
|
||||
('scheme', str), ('netloc', str), ('path', str), ('query', str), ('fragment', str)
|
||||
]), ResultMixin):
|
||||
def geturl(self) -> str: ...
|
||||
|
||||
class ParseResult(NamedTuple('ParseResult', [
|
||||
('scheme', str), ('netloc', str), ('path', str), ('params', str), ('query', str),
|
||||
('fragment', str)
|
||||
]), ResultMixin):
|
||||
def geturl(self) -> str: ...
|
||||
|
||||
def urlparse(url: str, scheme: str = '', allow_fragments: bool = True) -> ParseResult: ...
|
||||
def urlsplit(url: str, scheme: str = '', allow_fragments: bool = True) -> SplitResult: ...
|
||||
def urlunparse(data: Tuple[str, str, str, str, str, str]) -> str: ...
|
||||
def urlunsplit(data: Tuple[str, str, str, str, str]) -> str: ...
|
||||
def urljoin(base: str, url: str, allow_fragments: bool = True) -> str: ...
|
||||
def urldefrag(url: str) -> str: ...
|
||||
def unquote(s: str) -> str: ...
|
||||
def parse_qs(qs: str, keep_blank_values: bool = ...,
|
||||
strict_parsing: bool = ...) -> Dict[str, List[str]]: ...
|
||||
def parse_qsl(qs: str, keep_blank_values: int = ...,
|
||||
strict_parsing: bool = ...) -> List[Tuple[str, str]]: ...
|
||||
Reference in New Issue
Block a user