From 1316d4f2d13ae1ad6d84775ce0680ad8df061269 Mon Sep 17 00:00:00 2001 From: l5y <220195275+l5yth@users.noreply.github.com> Date: Sat, 11 Oct 2025 20:38:40 +0200 Subject: [PATCH] Clarify network target parsing (#285) --- data/mesh_ingestor/interfaces.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/data/mesh_ingestor/interfaces.py b/data/mesh_ingestor/interfaces.py index 59af696..7fae1dd 100644 --- a/data/mesh_ingestor/interfaces.py +++ b/data/mesh_ingestor/interfaces.py @@ -215,10 +215,14 @@ def _parse_ble_target(value: str) -> str | None: def _parse_network_target(value: str) -> tuple[str, int] | None: - """Return ``(host, port)`` when ``value`` is an IP address string. + """Return ``(host, port)`` when ``value`` is a numeric IP address string. + + Only literal IPv4 or IPv6 addresses are accepted, optionally paired with a + port or scheme. Callers that start from hostnames should resolve them to an + address before invoking this helper. Parameters: - value: Hostname or URL describing the TCP interface. + value: Numeric IP literal or URL describing the TCP interface. Returns: A ``(host, port)`` tuple or ``None`` when parsing fails.