Commit 12bff9d
Muhamed Fazal PS
fix: _is_trivial_response no longer skips valid JSON responses (#24)
Removed the naive text.startswith('{') and text.startswith('[') checks
that caused all JSON-formatted responses to be classified as trivial.
Lowered the code_char density threshold from 0.6 to 0.5 so that
highly-symbolic but non-JSON responses like '{ } ( ) = ; : # | \ > <'
are still correctly caught as trivial, while valid JSON is not.
Updated test assertions to match new behavior.
Fixes #241 parent 9df3738 commit 12bff9d
2 files changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments