Commit 8aa9a61
Use Field(default_factory=list) for Page.lines and Page.paragraphs
Pre-existing Optional[List[...]] = [] defaults silently parsed an
explicit JSON null to None, which would cause a TypeError when the
confidence evaluator iterates page.lines (line 132). Switch to the
same Field(default_factory=list) pattern used for the other Page
collections so these fields fail loudly at parse time on a malformed
response and remain safe to iterate at every call site.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ab1cccb commit 8aa9a61
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
0 commit comments