mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-11 01:02:10 +03:00
optimize _unix_annotations dedup with dict.fromkeys
This commit is contained in:
parent
f59f860327
commit
85da4aab1f
1 changed files with 1 additions and 5 deletions
|
|
@ -47,11 +47,7 @@ def _unix_probes(body: str) -> list[float | None]:
|
||||||
|
|
||||||
|
|
||||||
def _unix_annotations(body: str) -> list[str]:
|
def _unix_annotations(body: str) -> list[str]:
|
||||||
seen: list[str] = []
|
return list(dict.fromkeys(ANNOTATION_RE.findall(body)))
|
||||||
for token in ANNOTATION_RE.findall(body):
|
|
||||||
if token not in seen:
|
|
||||||
seen.append(token)
|
|
||||||
return seen
|
|
||||||
|
|
||||||
|
|
||||||
def parse_linux(text: str) -> list[TraceHop]:
|
def parse_linux(text: str) -> list[TraceHop]:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue