mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-15 02:31:09 +08:00
Fix arg types for os.execv* (#1075)
This commit is contained in:
1 parent
8318953a17
commit
ce3a76bb97
2 files changed
+18
-8
No files matched your search
@@ -201,10 +201,15 @@ def execl(file: _PathType, *args) -> None: ...
|
||||
def execle(file: _PathType, *args) -> None: ...
|
||||
def execlp(file: _PathType, *args) -> None: ...
|
||||
def execlpe(file: _PathType, *args) -> None: ...
|
||||
def execv(path: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]]) -> None: ...
|
||||
def execve(path: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]], env: Mapping[str, str]) -> None: ...
|
||||
def execvp(file: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]]) -> None: ...
|
||||
def execvpe(file: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]], env: Mapping[str, str]) -> None: ...
|
||||
|
||||
# The docs say `args: tuple or list of strings`
|
||||
# The implementation enforces tuple or list so we can't use Sequence.
|
||||
_ExecVArgs = Union[Tuple[Union[bytes, Text], ...], List[bytes], List[Text], List[Union[bytes, Text]]]
|
||||
def execv(path: _PathType, args: _ExecVArgs) -> None: ...
|
||||
def execve(path: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> None: ...
|
||||
def execvp(file: _PathType, args: _ExecVArgs) -> None: ...
|
||||
def execvpe(file: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> None: ...
|
||||
|
||||
def _exit(n: int) -> NoReturn: ...
|
||||
def fork() -> int: ...
|
||||
def forkpty() -> Tuple[int, int]: ...
|
||||
|
||||
Reference in new issue
Block a user