Skip to content

Commit 51c92d8

Browse files
_posixsubprocess: improve types (#9009)
1 parent e0aa539 commit 51c92d8

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

stdlib/_posixsubprocess.pyi

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
import sys
2+
from _typeshed import StrOrBytesPath
23
from collections.abc import Callable, Sequence
4+
from typing_extensions import SupportsIndex
35

46
if sys.platform != "win32":
57
def cloexec_pipe() -> tuple[int, int]: ...
68
def fork_exec(
7-
args: Sequence[str],
8-
executable_list: Sequence[bytes],
9-
close_fds: bool,
10-
fds_to_keep: Sequence[int],
11-
cwd: str,
12-
env_list: Sequence[bytes],
13-
p2cread: int,
14-
p2cwrite: int,
15-
c2pred: int,
16-
c2pwrite: int,
17-
errread: int,
18-
errwrite: int,
19-
errpipe_read: int,
20-
errpipe_write: int,
21-
restore_signals: int,
22-
start_new_session: int,
23-
preexec_fn: Callable[[], None],
9+
__process_args: Sequence[StrOrBytesPath] | None,
10+
__executable_list: Sequence[bytes],
11+
__close_fds: bool,
12+
__fds_to_keep: tuple[int, ...],
13+
__cwd_obj: str,
14+
__env_list: Sequence[bytes] | None,
15+
__p2cread: int,
16+
__p2cwrite: int,
17+
__c2pred: int,
18+
__c2pwrite: int,
19+
__errread: int,
20+
__errwrite: int,
21+
__errpipe_read: int,
22+
__errpipe_write: int,
23+
__restore_signals: int,
24+
__call_setsid: int,
25+
__pgid_to_set: int,
26+
__gid_object: SupportsIndex | None,
27+
__groups_list: list[int] | None,
28+
__uid_object: SupportsIndex | None,
29+
__child_umask: int,
30+
__preexec_fn: Callable[[], None],
31+
__allow_vfork: bool,
2432
) -> int: ...

0 commit comments

Comments
 (0)