From b8c0ccb9856aad1aeebdf57ff0a295d9f733c12a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 27 Oct 2022 19:48:36 -0700 Subject: [PATCH 1/2] _posixsubprocess: improve types --- stdlib/_posixsubprocess.pyi | 42 ++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/stdlib/_posixsubprocess.pyi b/stdlib/_posixsubprocess.pyi index 2d221c4896f6..f06cd08579ee 100644 --- a/stdlib/_posixsubprocess.pyi +++ b/stdlib/_posixsubprocess.pyi @@ -1,24 +1,32 @@ +from _typeshed import StrOrBytesPath import sys from collections.abc import Callable, Sequence +from typing_extensions import SupportsIndex if sys.platform != "win32": def cloexec_pipe() -> tuple[int, int]: ... def fork_exec( - args: Sequence[str], - executable_list: Sequence[bytes], - close_fds: bool, - fds_to_keep: Sequence[int], - cwd: str, - env_list: Sequence[bytes], - p2cread: int, - p2cwrite: int, - c2pred: int, - c2pwrite: int, - errread: int, - errwrite: int, - errpipe_read: int, - errpipe_write: int, - restore_signals: int, - start_new_session: int, - preexec_fn: Callable[[], None], + __process_args: Sequence[StrOrBytesPath] | None, + __executable_list: Sequence[bytes], + __close_fds: bool, + __fds_to_keep: tuple[int, ...], + __cwd_obj: str, + __env_list: Sequence[bytes] | None, + __p2cread: int, + __p2cwrite: int, + __c2pred: int, + __c2pwrite: int, + __errread: int, + __errwrite: int, + __errpipe_read: int, + __errpipe_write: int, + __restore_signals: int, + __call_setsid: int, + __pgid_to_set: int, + __gid_object: SupportsIndex | None, + __groups_list: list[int] | None, + __uid_object: SupportsIndex | None, + __child_umask: int, + __preexec_fn: Callable[[], None], + __allow_vfork: bool, ) -> int: ... From 8d6587fe72a95d821342f959da66f370433fcbc5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Oct 2022 02:50:39 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/_posixsubprocess.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/_posixsubprocess.pyi b/stdlib/_posixsubprocess.pyi index f06cd08579ee..ca95336bb503 100644 --- a/stdlib/_posixsubprocess.pyi +++ b/stdlib/_posixsubprocess.pyi @@ -1,5 +1,5 @@ -from _typeshed import StrOrBytesPath import sys +from _typeshed import StrOrBytesPath from collections.abc import Callable, Sequence from typing_extensions import SupportsIndex @@ -25,7 +25,7 @@ if sys.platform != "win32": __pgid_to_set: int, __gid_object: SupportsIndex | None, __groups_list: list[int] | None, - __uid_object: SupportsIndex | None, + __uid_object: SupportsIndex | None, __child_umask: int, __preexec_fn: Callable[[], None], __allow_vfork: bool,