mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Add NoReturn to execv* family of functions (#2226)
This commit is contained in:
committed by
Jelle Zijlstra
parent
ff821f9751
commit
56c93c85c0
@@ -253,10 +253,10 @@ def execlpe(file: _PathType, __arg0: Union[bytes, Text], *args: Any) -> NoReturn
|
||||
# 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 execv(path: _PathType, args: _ExecVArgs) -> NoReturn: ...
|
||||
def execve(path: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> NoReturn: ...
|
||||
def execvp(file: _PathType, args: _ExecVArgs) -> NoReturn: ...
|
||||
def execvpe(file: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> NoReturn: ...
|
||||
|
||||
def _exit(n: int) -> NoReturn: ...
|
||||
def fork() -> int: ... # Unix only
|
||||
|
||||
@@ -547,10 +547,10 @@ def execlpe(file: _PathType, __arg0: Union[bytes, Text], *args: Any) -> NoReturn
|
||||
# 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: _FdOrPathType, 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 execv(path: _PathType, args: _ExecVArgs) -> NoReturn: ...
|
||||
def execve(path: _FdOrPathType, args: _ExecVArgs, env: Mapping[str, str]) -> NoReturn: ...
|
||||
def execvp(file: _PathType, args: _ExecVArgs) -> NoReturn: ...
|
||||
def execvpe(file: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> NoReturn: ...
|
||||
|
||||
def _exit(n: int) -> NoReturn: ...
|
||||
def fork() -> int: ... # Unix only
|
||||
|
||||
Reference in New Issue
Block a user