mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Broaden the signature of subprocess.list2cmdline. (#5824)
Although the parameter is called 'seq', the implementation shows that it
can be anything that can be passed to map(), which takes iterables:
0f42b726c8/Lib/subprocess.py (L565).
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
import sys
|
||||
from _typeshed import Self, StrOrBytesPath
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Callable, Generic, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union, overload
|
||||
from typing import (
|
||||
IO,
|
||||
Any,
|
||||
AnyStr,
|
||||
Callable,
|
||||
Generic,
|
||||
Iterable,
|
||||
Mapping,
|
||||
Optional,
|
||||
Sequence,
|
||||
Tuple,
|
||||
Type,
|
||||
TypeVar,
|
||||
Union,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import Literal
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -1016,7 +1031,7 @@ 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: Sequence[str]) -> str: ... # undocumented
|
||||
def list2cmdline(seq: Iterable[str]) -> str: ... # undocumented
|
||||
|
||||
if sys.platform == "win32":
|
||||
class STARTUPINFO:
|
||||
|
||||
Reference in New Issue
Block a user