mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Fix arg types for os.execv* (#1075)
This commit is contained in:
committed by
Jelle Zijlstra
parent
8318953a17
commit
ce3a76bb97
@@ -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]: ...
|
||||
|
||||
@@ -346,10 +346,15 @@ def execle(path: _PathType, arg0: Union[bytes, Text],
|
||||
def execlp(path: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> None: ...
|
||||
def execlpe(path: _PathType, arg0: Union[bytes, Text],
|
||||
*args: Any) -> None: ... # Imprecise signature
|
||||
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: ... # Unix only
|
||||
def forkpty() -> Tuple[int, int]: ... # some flavors of Unix
|
||||
|
||||
Reference in New Issue
Block a user