|
1 | | -from _typeshed import BytesPath, Incomplete, StrPath, Unused |
| 1 | +from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused |
2 | 2 | from collections.abc import Callable, Iterable, MutableSequence, Sequence |
| 3 | +from subprocess import _ENV |
3 | 4 | from typing import ClassVar, Final, Literal, TypeVar, overload |
4 | 5 | from typing_extensions import TypeAlias, TypeVarTuple, Unpack |
5 | 6 |
|
@@ -172,7 +173,12 @@ class Compiler: |
172 | 173 | def execute( |
173 | 174 | self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1 |
174 | 175 | ) -> None: ... |
175 | | - def spawn(self, cmd: MutableSequence[bytes | StrPath]) -> None: ... |
| 176 | + @overload |
| 177 | + def spawn(self, cmd: Sequence[StrOrBytesPath], *, search_path: Literal[False], env: _ENV | None = None) -> None: ... |
| 178 | + @overload |
| 179 | + def spawn( |
| 180 | + self, cmd: MutableSequence[bytes | StrPath], *, search_path: Literal[True] = True, env: _ENV | None = None |
| 181 | + ) -> None: ... |
176 | 182 | def mkpath(self, name: str, mode: int = 0o777) -> None: ... |
177 | 183 | @overload |
178 | 184 | def move_file(self, src: StrPath, dst: _StrPathT) -> _StrPathT | str: ... |
|
0 commit comments