Commit 3c5ca52
committed
Simplify _safer_popen_windows "if shell" logic
This fixes a static typing error reported by mypy.
Using a separate variable, as I had done originally, does not seem
to be clearer than rebinding the parameter, and in this case the
code is simpler and can be checked by mypy without needing another
explicit type annotation to be added. This fixes one mypy error.
This also adds a comment to make clearer why the mapping passed in
is copied when modifications are needed, rather than mutated.1 parent 2212ac9 commit 3c5ca52
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
| |||
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
276 | | - | |
| 275 | + | |
277 | 276 | | |
278 | 277 | | |
279 | 278 | | |
| |||
0 commit comments