@@ -346,10 +346,15 @@ def execle(path: _PathType, arg0: Union[bytes, Text],
346
346
def execlp (path : _PathType , arg0 : Union [bytes , Text ], * args : Union [bytes , Text ]) -> None : ...
347
347
def execlpe (path : _PathType , arg0 : Union [bytes , Text ],
348
348
* args : Any ) -> None : ... # Imprecise signature
349
- def execv (path : _PathType , args : Union [Tuple [Union [bytes , Text ]], List [Union [bytes , Text ]]]) -> None : ...
350
- def execve (path : _PathType , args : Union [Tuple [Union [bytes , Text ]], List [Union [bytes , Text ]]], env : Mapping [str , str ]) -> None : ...
351
- def execvp (file : _PathType , args : Union [Tuple [Union [bytes , Text ]], List [Union [bytes , Text ]]]) -> None : ...
352
- def execvpe (file : _PathType , args : Union [Tuple [Union [bytes , Text ]], List [Union [bytes , Text ]]], env : Mapping [str , str ]) -> None : ...
349
+
350
+ # The docs say `args: tuple or list of strings`
351
+ # The implementation enforces tuple or list so we can't use Sequence.
352
+ _ExecVArgs = Union [Tuple [Union [bytes , Text ], ...], List [bytes ], List [Text ], List [Union [bytes , Text ]]]
353
+ def execv (path : _PathType , args : _ExecVArgs ) -> None : ...
354
+ def execve (path : _PathType , args : _ExecVArgs , env : Mapping [str , str ]) -> None : ...
355
+ def execvp (file : _PathType , args : _ExecVArgs ) -> None : ...
356
+ def execvpe (file : _PathType , args : _ExecVArgs , env : Mapping [str , str ]) -> None : ...
357
+
353
358
def _exit (n : int ) -> NoReturn : ...
354
359
def fork () -> int : ... # Unix only
355
360
def forkpty () -> Tuple [int , int ]: ... # some flavors of Unix
0 commit comments