Commit 50a1bfc
Clear the last mypy errors and store the resolvable DOI
Closes #18.
extract_cv.py, the one finding that was a real shape problem rather than
a stub gap: preprocess_content returned a bare string when
extract_footnotes was false and a (footnote, content) pair when it was
true. There is exactly one caller in the repo and it always passes true,
so the string branch was dead code that its own docstring described as
backwards compatibility. Dropped the flag and the function now always
returns the pair. Losing the else branch also loses its blfootnote
removal, which is equivalent: extract_footnote strips the footnote it
extracts, and when there is no footnote there is nothing to strip.
extract_people.py gets one attr_str helper rather than a cast per call
site. BeautifulSoup types attribute access as str, AttributeValueList or
None because a multi-valued attribute like class comes back as a list;
src and href never do, so the helper joins a list and passes a string
through. It applies at six sites, not the three mypy first reported --
fixing those unmasked two more that had been hidden behind them.
onboard_member.py: the RGBA corner check now tests isinstance before
indexing, which behaves as before for a non-tuple since the enclosing
except already caught that; and the re.subn lambda became a named
function so mypy can pin the AnyStr overload.
The publications DOI goes back to 10.31234/osf.io/mhxtd_v1, which
resolves. PsyArXiv has not minted the unversioned form, so the shorter
one was a dead identifier. The column is still never rendered.
Verified by rebuilding: JRM_CV.html is byte-identical after the parser
change and both section-note footnotes still render, which is what
actually proves it, and all four content pages are unchanged too.
extract_people.py has no tests, so its extraction was exercised directly
against the live page: 181 rows over 7 sections with every url and image
field a string. mypy and ruff are both clean and the suite is 348 passed,
12 skipped.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QQUWxAFYESZCZe3DLyy1eB1 parent 72cebb2 commit 50a1bfc
5 files changed
Lines changed: 44 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
| 467 | + | |
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
469 | 475 | | |
470 | 476 | | |
471 | 477 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
| 452 | + | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
| 459 | + | |
465 | 460 | | |
466 | 461 | | |
467 | 462 | | |
| |||
470 | 465 | | |
471 | 466 | | |
472 | 467 | | |
473 | | - | |
474 | | - | |
475 | | - | |
| 468 | + | |
476 | 469 | | |
477 | 470 | | |
478 | 471 | | |
479 | 472 | | |
480 | 473 | | |
481 | 474 | | |
482 | | - | |
| 475 | + | |
483 | 476 | | |
484 | 477 | | |
485 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
271 | 285 | | |
272 | 286 | | |
273 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
644 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
645 | 647 | | |
646 | 648 | | |
647 | 649 | | |
| |||
1040 | 1042 | | |
1041 | 1043 | | |
1042 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1043 | 1048 | | |
1044 | | - | |
1045 | | - | |
| 1049 | + | |
1046 | 1050 | | |
1047 | 1051 | | |
1048 | 1052 | | |
| |||
0 commit comments