Repository navigation
Commit 7c7dd53
committed
Add full type annotations to gPhoton/moviemaker/_steps.py.
This code uses dicts as pseudo-records a lot and therefore the typing
is sloppier than I would ideally like.
For clarity, sm_make_map was folded into sm_make_maps and the loop
unrolled.
So as not to be using one dict for two radically different things, up
in make_movies, the alternative threads/no-threads code paths needed
to be split apart.
Some of the functions in calibrate.py were incorrectly annotated in
an earlier commit; this is corrected now I can see what their callers
actually supply.
In a few places we use the experimental shape typing from numpy 2.2;
this should be removed with prejudice if it causes any problems
whatsoever (see numpy/numpy#28076 ) but
it does seem to work for the very limited case this code wants, i.e.
“this is a 2-d matrix”.1 parent 3cf534b commit 7c7dd53
4 files changed
Lines changed: 220 additions & 137 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
627 | 626 | | |
628 | 627 | | |
629 | 628 | | |
630 | | - | |
| 629 | + | |
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
634 | 633 | | |
635 | 634 | | |
636 | | - | |
| 635 | + | |
637 | 636 | | |
638 | 637 | | |
639 | 638 | | |
640 | 639 | | |
641 | 640 | | |
642 | 641 | | |
643 | | - | |
| 642 | + | |
644 | 643 | | |
645 | 644 | | |
646 | 645 | | |
| |||
0 commit comments