File: urlparse.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (68 lines) | stat: -rw-r--r-- 2,100 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Stubs for urlparse (Python 2)

from typing import Dict, List, NamedTuple, Tuple, Sequence, Union, overload

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 = ...  # type: str
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: Union[str, unicode], scheme: str = ...,
             allow_fragments: bool = ...) -> ParseResult: ...
def urlsplit(url: Union[str, unicode], 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: Union[str, unicode], url: Union[str, unicode],
            allow_fragments: bool = ...) -> str: ...
def urldefrag(url: Union[str, unicode]) -> 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]]: ...