Skip to content

Commit 43b7f8a

Browse files
committed
Annotate safer_popen broad enough for all platforms
This fixes another static typing error reported by mypy. (The annotation could be made more specific in the future by making a custom protocol for it, which may or may not be worthwhile, given that `**kwargs: Any` would still have to be present after whatever typed keyword arguments the protocol's `__call__` method listed, since some callers intentionally forward arbitrary extra keyword arguments through safer_popen to Popen.)
1 parent 3c5ca52 commit 43b7f8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: git/cmd.py

+2
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ def _safer_popen_windows(
278278
)
279279

280280

281+
safer_popen: Callable[..., Popen]
282+
281283
if os.name == "nt":
282284
safer_popen = _safer_popen_windows
283285
else:

0 commit comments

Comments
 (0)