Commit 88b8371
committed
Fix CI: widen control_task_factory return to Any
Previous Protocol-based typing went the wrong direction: a Protocol
with send_task(**kwargs) was too loose for ControlTask.send_task
(which has specific positional params) AND too tight to uniformly
cover the test fakes (NoopControlTask only accepts **kwargs,
FakeControlTask takes named positional params). Mypy rejected
ControlTask itself as the default.
Drop the Protocol; type the factory return as Any. The runtime
collaborator is duck-typed — the dispatcher only invokes
send_task(**named_kwargs) — and Any is what the DI seam is actually
for.1 parent 07e8d85 commit 88b8371
1 file changed
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 32 | | |
45 | 33 | | |
46 | 34 | | |
| |||
68 | 56 | | |
69 | 57 | | |
70 | 58 | | |
71 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
72 | 63 | | |
73 | 64 | | |
74 | 65 | | |
| |||
0 commit comments