Commit c859398
committed
Update loop task factory typing with kwargs
For `PY311` the task factory will be called with the context kwarg. This
is not correctly reflected in the typing for `Loop.set_task_factory` and
`Loop.get_task_factory`. This commit addresses this with a protocol.
Since `uvloop` requires a minimum Python 3.8 version, in which
`typing.Protocol` is available; the more appropriate `typing.Unpack` for
kwargs is introduced in Python 3.11.1 parent 6c770dc commit c859398
1 file changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments