fix: improve data extraction in _read_events function for better type handling
This commit is contained in:
@@ -42,7 +42,8 @@ def _read_events(jsonl_path: Path) -> list[_Event]:
|
||||
continue
|
||||
if not isinstance(obj, dict):
|
||||
continue
|
||||
data = obj.get("data") if isinstance(obj.get("data"), dict) else {}
|
||||
_raw = obj.get("data")
|
||||
data: dict[str, object] = _raw if isinstance(_raw, dict) else {}
|
||||
elapsed: int | None = None
|
||||
raw_elapsed = data.get("elapsedSec")
|
||||
if isinstance(raw_elapsed, int | float):
|
||||
|
||||
Reference in New Issue
Block a user