Repository navigation
Commit 81daa6a
fix: LabelMeReader raises on unreadable input instead of returning None (#208)
Remove the broad try/except in LabelMeReader.__init__, which swallowed
OSError and JSON errors and returned a half-initialised reader. The
original exception now propagates. Adds tests for a missing file and for
invalid JSON.
Refs #150
Co-authored-by: zw1915 <134981642+zw1915@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>1 parent 3594254 commit 81daa6a
2 files changed
Lines changed: 34 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4444 | 4444 | | |
4445 | 4445 | | |
4446 | 4446 | | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
4447 | 4453 | | |
4448 | 4454 | | |
4449 | 4455 | | |
| |||
4492 | 4498 | | |
4493 | 4499 | | |
4494 | 4500 | | |
4495 | | - | |
4496 | | - | |
4497 | | - | |
| 4501 | + | |
| 4502 | + | |
4498 | 4503 | | |
4499 | | - | |
4500 | | - | |
4501 | | - | |
4502 | | - | |
4503 | | - | |
4504 | | - | |
4505 | | - | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
4506 | 4509 | | |
4507 | 4510 | | |
4508 | 4511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
610 | 631 | | |
611 | 632 | | |
612 | 633 | | |
| |||
0 commit comments