mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-10 23:52:04 +03:00
use list comprehension for _unix_probes
This commit is contained in:
parent
85da4aab1f
commit
e4c51546ba
1 changed files with 4 additions and 4 deletions
|
|
@ -40,10 +40,10 @@ def _unix_host_and_ip(body: str) -> tuple[str | None, str | None]:
|
|||
|
||||
|
||||
def _unix_probes(body: str) -> list[float | None]:
|
||||
probes: list[float | None] = []
|
||||
for match in _UNIX_PROBE_RE.finditer(body):
|
||||
probes.append(None if match.group("star") else float(match.group("rtt")))
|
||||
return probes
|
||||
return [
|
||||
None if match.group("star") else float(match.group("rtt"))
|
||||
for match in _UNIX_PROBE_RE.finditer(body)
|
||||
]
|
||||
|
||||
|
||||
def _unix_annotations(body: str) -> list[str]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue