Skip to content

Commit 49393b2

Browse files
fix: expose SessionValidationError.detail and fix test mypy types
1 parent 37cf318 commit 49393b2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

models/errors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ class SessionValidationError(ValueError):
1212

1313
def __init__(self, path: str, detail: str) -> None:
1414
self.path = path
15+
self.detail = detail
1516
super().__init__(f"Session validation failed at {path}: {detail}")

tests/test_jsonl_validation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import sys
5+
from typing import Any
56

67
import pytest
78

@@ -14,8 +15,8 @@
1415
FIXTURES = os.path.join(os.path.dirname(__file__), "fixtures")
1516

1617

17-
def _valid_payload(**overrides: object) -> dict:
18-
base = {
18+
def _valid_payload(**overrides: Any) -> dict[str, Any]:
19+
base: dict[str, Any] = {
1920
"session_id": "abc123",
2021
"title": "Test Session",
2122
"messages": [{"role": "user", "text": "hello"}],

0 commit comments

Comments
 (0)