subprocess.(check_)call: add text argument new in 3.7 (#8070)

This commit is contained in:
Alex Waygood
2022-06-14 01:54:16 +01:00
committed by GitHub
parent 1828ba2045
commit 60c2733ca8

View File

@@ -407,49 +407,99 @@ else:
) -> CompletedProcess[Any]: ...
# Same args as Popen.__init__
def call(
args: _CMD,
bufsize: int = ...,
executable: StrOrBytesPath | None = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: _ENV | None = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float | None = ...,
) -> int: ...
if sys.version_info >= (3, 7):
def call(
args: _CMD,
bufsize: int = ...,
executable: StrOrBytesPath | None = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: _ENV | None = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float | None = ...,
text: bool | None = ...,
) -> int: ...
else:
def call(
args: _CMD,
bufsize: int = ...,
executable: StrOrBytesPath | None = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: _ENV | None = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float | None = ...,
) -> int: ...
# Same args as Popen.__init__
def check_call(
args: _CMD,
bufsize: int = ...,
executable: StrOrBytesPath = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: _ENV | None = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float | None = ...,
) -> int: ...
if sys.version_info >= (3, 7):
def check_call(
args: _CMD,
bufsize: int = ...,
executable: StrOrBytesPath = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: _ENV | None = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float | None = ...,
*,
text: bool | None = ...,
) -> int: ...
else:
def check_call(
args: _CMD,
bufsize: int = ...,
executable: StrOrBytesPath = ...,
stdin: _FILE = ...,
stdout: _FILE = ...,
stderr: _FILE = ...,
preexec_fn: Callable[[], Any] | None = ...,
close_fds: bool = ...,
shell: bool = ...,
cwd: StrOrBytesPath | None = ...,
env: _ENV | None = ...,
universal_newlines: bool = ...,
startupinfo: Any = ...,
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float | None = ...,
) -> int: ...
if sys.version_info >= (3, 7):
# 3.7 added text