mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-10 15:42: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]:
|
||||
seen: list[str] = []
|
||||
for token in ANNOTATION_RE.findall(body):
|
||||
if token not in seen:
|
||||
seen.append(token)
|
||||
return seen
|
||||
return list(dict.fromkeys(ANNOTATION_RE.findall(body)))
|
||||
|
||||
|
||||
def parse_linux(text: str) -> list[TraceHop]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue