-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathurl.pyi
33 lines (29 loc) · 844 Bytes
/
url.pyi
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
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
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) -> Self: ...
class Domain:
def __init__(self, value: str): ...