Simplify docstrings.

This commit is contained in:
Talmaj Marinc 2026-06-30 17:17:34 +02:00
parent 7dba134cda
commit 9be31a4b7e
4 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
A single session reuses TLS handshakes and TCP connections across the probe A single session reuses TLS handshakes and TCP connections across the probe
and the many segment GETs to the same host (HuggingFace is the dominant and the many segment GETs to the same host (HuggingFace is the dominant
case), which is a large speedup on cold connections and exactly the case), which is a large speedup on cold connections and exactly the
connection-reuse strategy that lets us match aria2c (PRD section 5.2). connection-reuse strategy that lets us match aria2c.
The connector uses :class:`ValidatingResolver` so every connection initial The connector uses :class:`ValidatingResolver` so every connection initial
or post-redirect is screened for private/special-use IPs at connect time. or post-redirect is screened for private/special-use IPs at connect time.

View File

@ -1,4 +1,4 @@
"""URL allowlist for server-side model fetches (PRD section 9.1). """URL allowlist for server-side model fetches.
Default-deny. A URL is downloadable only when its parsed host + scheme are Default-deny. A URL is downloadable only when its parsed host + scheme are
allowlisted AND (unless explicitly relaxed) its final filename ends in a allowlisted AND (unless explicitly relaxed) its final filename ends in a
@ -56,8 +56,8 @@ def _allowed_hosts() -> dict[str, set[str]]:
def is_host_allowed(host: str | None, scheme: str | None) -> bool: def is_host_allowed(host: str | None, scheme: str | None) -> bool:
"""True iff ``host`` is allowlisted for ``scheme``. """True iff ``host`` is allowlisted for ``scheme``.
Used both for the initial URL and re-checked on every redirect hop Used both for the initial URL and re-checked on every redirect hop,
(PRD section 9.2), so a whitelisted URL cannot 30x into an off-list host. so a whitelisted URL cannot 30x into an off-list host.
""" """
if not host or not scheme: if not host or not scheme:
return False return False

View File

@ -1,4 +1,4 @@
"""Path resolution + traversal safety for downloads (PRD section 9.3). """Path resolution + traversal safety for downloads.
A ``model_id`` is a *relative destination path* of the form A ``model_id`` is a *relative destination path* of the form
``<directory>/<filename>`` (e.g. ``loras/my_lora.safetensors``). This module ``<directory>/<filename>`` (e.g. ``loras/my_lora.safetensors``). This module

View File

@ -1,4 +1,4 @@
"""SSRF / exfiltration defenses (PRD section 9.2). """SSRF / exfiltration defenses.
Two cooperating layers: Two cooperating layers: