Commit 4083dd8
committed
Fix new mypy confusion about kill_after_timeout type
The refactoring in 1ef3365 before this added a new mypy error on
non-Windows platforms, where mypy failed to infer that the type of
kill_after_timeout was `float` (rather than `float | None`) at the
point in the code where it was used as a captured variable in the
newly introduced communicate() helper.
This was even though the variable is never rebound there or in the
enclosing scope that introduced it. So introducing and using a new
variable that holds the same reference, which is sufficient to fix
the problem and is the approach taken here, is not a behavioral
change.1 parent 1ef3365 commit 4083dd8
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
| 1183 | + | |
| 1184 | + | |
1183 | 1185 | | |
1184 | 1186 | | |
1185 | 1187 | | |
| |||
1216 | 1218 | | |
1217 | 1219 | | |
1218 | 1220 | | |
1219 | | - | |
| 1221 | + | |
1220 | 1222 | | |
1221 | 1223 | | |
1222 | 1224 | | |
| |||
1225 | 1227 | | |
1226 | 1228 | | |
1227 | 1229 | | |
1228 | | - | |
| 1230 | + | |
1229 | 1231 | | |
1230 | 1232 | | |
1231 | 1233 | | |
| |||
0 commit comments