OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python311
/
lib
/
python3.11
/
site-packages
/
mdurl
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/05/2025 09:34:01 AM
rwxr-xr-x
📄
__init__.py
547 bytes
05/08/2024 06:42:35 PM
rw-r--r--
📁
__pycache__
-
05/08/2024 06:42:35 PM
rwxr-xr-x
📄
_decode.py
2.93 KB
05/08/2024 06:42:35 PM
rw-r--r--
📄
_encode.py
2.54 KB
05/08/2024 06:42:35 PM
rw-r--r--
📄
_format.py
626 bytes
05/08/2024 06:42:35 PM
rw-r--r--
📄
_parse.py
11.11 KB
05/08/2024 06:42:35 PM
rw-r--r--
📄
_url.py
284 bytes
05/08/2024 06:42:35 PM
rw-r--r--
📄
py.typed
26 bytes
05/08/2024 06:42:35 PM
rw-r--r--
Editing: _format.py
Close
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from mdurl._url import URL def format(url: URL) -> str: # noqa: A001 result = "" result += url.protocol or "" result += "//" if url.slashes else "" result += url.auth + "@" if url.auth else "" if url.hostname and ":" in url.hostname: # ipv6 address result += "[" + url.hostname + "]" else: result += url.hostname or "" result += ":" + url.port if url.port else "" result += url.pathname or "" result += url.search or "" result += url.hash or "" return result