From 766f7e76ec6ce7fc1fd88fd1016b79346c57e964 Mon Sep 17 00:00:00 2001 From: ROHAN SALWAN <73494189+Rohan-Salwan@users.noreply.github.com> Date: Mon, 25 Oct 2021 14:36:55 +0530 Subject: [PATCH] Fix subprocess.list2cmdline: wrong type of the seq argument (#6190) --- stdlib/subprocess.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stdlib/subprocess.pyi b/stdlib/subprocess.pyi index 8ee612e28..fce517745 100644 --- a/stdlib/subprocess.pyi +++ b/stdlib/subprocess.pyi @@ -1016,7 +1016,12 @@ class Popen(Generic[AnyStr]): # The result really is always a str. def getstatusoutput(cmd: _TXT) -> tuple[int, str]: ... def getoutput(cmd: _TXT) -> str: ... -def list2cmdline(seq: Iterable[str]) -> str: ... # undocumented + +if sys.version_info >= (3, 8): + def list2cmdline(seq: Iterable[StrOrBytesPath]) -> str: ... # undocumented + +else: + def list2cmdline(seq: Iterable[str]) -> str: ... # undocumented if sys.platform == "win32": class STARTUPINFO: