Commit 65fc7a5
Add type check for explicit ValueType.BOOLEAN in encode_value
Previously, encode_value with explicit BOOLEAN used Python truthiness
to coerce any value (strings, lists, dicts) to True/False silently.
Now rejects non-bool/int types with a clear EncodeError.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 918f48d commit 65fc7a5
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
321 | 332 | | |
322 | 333 | | |
323 | 334 | | |
| |||
0 commit comments