Repository navigation
Commit f68e02b
committed
Empty the typing contract's exemption list but for one module
Forty-one modules in one sweep, and the list is now a single line:
`gui/remote_desktop/webrtc_panel.py`, blocked on the split its size cap
already owes it (recorded in Progress.md).
Several were annotations that were simply wrong about what the code
returns, and fixing them is what let the callers stop working around it:
* `screenshot()` said `-> List[int]` while it returns the captured BGR
frame. Every caller that read `.shape` off it was reading through a
lie; `screen_record` was the one mypy caught.
* `visual_match._nms` was typed for `Match` and reused from
`rotated_match`, `edge_match` and `color_match` with their own record
types. It takes a `TypeVar` bound to a read-only Protocol of what it
actually reads — position, size, score — which is also why the bound
had to be properties: the records are frozen dataclasses, and a
Protocol attribute demands a writable one.
* `logical_frame`'s injectable grabber was typed `Callable[..., Any]`
while its own docstring says "ImageGrab-shaped object", so `.grab()`
on it was an error.
Four fix a `None` the code could really see: `humanize.motion` and
`watcher` unpacked `get_mouse_position()` (the Windows backend returns
None on a locked desktop), `dag.runner` opened a node's `action_file`
without checking a node had one, and `color_match` divided a `None`
accumulator when handed no channels.
`secret_store._require_unlocked` now returns the `(fernet, vault)` pair
it checks, which removed three `type: ignore`s that existed only because
the check and the use were separate statements.
Two more cv2 names — `VideoWriter_fourcc` and `ORB_create` — join
`MSER_create` as present at runtime but absent from the shipped stub.1 parent d0b49cf commit f68e02b
43 files changed
Lines changed: 210 additions & 160 deletions
File tree
- je_auto_control
- utils
- act_modes
- annotate
- change_localize
- codegen
- color_match
- color_stats
- config_sync
- cv2_utils
- dag
- data_quality
- dbus_client
- element_parse
- element_proposal
- expect_poll
- feature_match
- flow_debugger
- generate_report
- humanize
- json_patch
- locale_collation
- monitor_layout
- mouse_path
- ocr/backends
- preprocess
- profiler
- qr
- rate_limit
- sbom
- scheduler
- search_index
- secrets
- socket_server
- text_normalize
- tls_acme
- visual_match
- visual_regression
- watcher
- xml/xml_file
- wrapper
- test/verify
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
0 commit comments