-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathurl.pyi
More file actions
42 lines (38 loc) · 1.28 KB
/
url.pyi
File metadata and controls
42 lines (38 loc) · 1.28 KB
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
from collections.abc import Iterable
from typing import Self
class URLError(Exception): ...
class RelativeURLWithoutBase(Exception): ...
class InvalidIPv6Address(Exception): ...
class URL:
cannot_be_a_base: bool
host: Domain
host_str: str
password: str
path: str
path_segments: Iterable[str]
scheme: str
username: str
fragment: str | None
query: str | None
query_pairs: list[tuple[str, str]]
def __truediv__(self, other: str) -> Self: ...
@classmethod
def parse(cls, input: str) -> Self: ...
@classmethod
def parse_with_params(
cls,
input: str,
params: Iterable[tuple[str, str]],
) -> Self: ...
def join(self, other: str) -> Self: ...
def make_relative(self, other: Self) -> str: ...
def with_fragment(self, fragment: str | None = None) -> Self: ...
def with_query(self, query: str | None = None) -> Self: ...
def without_query(self) -> Self: ...
def with_pair(self, key: str, value: str) -> Self: ...
def with_key_only(self, key: str) -> Self: ...
def with_pairs(self, pairs: Iterable[tuple[str, str]]) -> Self: ...
def with_keys_only(self, keys: Iterable[str]) -> Self: ...
def without_pair(self, key: str) -> Self: ...
class Domain:
def __init__(self, value: str): ...