fix: streamline elapsed time extraction in _read_events function
Lint / pssa (push) Successful in 9s
Lint / python (push) Failing after 17s

This commit is contained in:
2026-05-26 21:27:13 +02:00
parent 8dc7a4fb99
commit c0f31e375a
+1 -2
View File
@@ -44,12 +44,11 @@ def _read_events(jsonl_path: Path) -> list[_Event]:
continue
data = obj.get("data") if isinstance(obj.get("data"), dict) else {}
elapsed: int | None = None
if isinstance(data, dict):
raw_elapsed = data.get("elapsedSec")
if isinstance(raw_elapsed, int | float):
elapsed = int(raw_elapsed)
err: str | None = None
if isinstance(data, dict) and isinstance(data.get("error"), str):
if isinstance(data.get("error"), str):
err = str(data["error"])
out.append(
_Event(