use list comprehension for _unix_probes

This commit is contained in:
Andrew Pimenov 2026-08-09 16:09:29 +03:00
parent 85da4aab1f
commit e4c51546ba

View file

@ -40,10 +40,10 @@ def _unix_host_and_ip(body: str) -> tuple[str | None, str | None]:
def _unix_probes(body: str) -> list[float | None]: def _unix_probes(body: str) -> list[float | None]:
probes: list[float | None] = [] return [
for match in _UNIX_PROBE_RE.finditer(body): None if match.group("star") else float(match.group("rtt"))
probes.append(None if match.group("star") else float(match.group("rtt"))) for match in _UNIX_PROBE_RE.finditer(body)
return probes ]
def _unix_annotations(body: str) -> list[str]: def _unix_annotations(body: str) -> list[str]: