Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/mdurl/_url.py: 33%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import annotations
3from collections import namedtuple
5TYPE_CHECKING = False
6if TYPE_CHECKING:
7 from typing import NamedTuple
9 class URL(NamedTuple):
10 protocol: str | None
11 slashes: bool
12 auth: str | None
13 port: str | None
14 hostname: str | None
15 hash: str | None # noqa: A003
16 search: str | None
17 pathname: str | None
19else:
20 URL = namedtuple(
21 "URL",
22 [
23 "protocol",
24 "slashes",
25 "auth",
26 "port",
27 "hostname",
28 "hash",
29 "search",
30 "pathname",
31 ],
32 )