Skip to content

Commit 177b1d7

Browse files
committed
setuptools: spawn functions should match each other
1 parent bf5b55d commit 177b1d7

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

stubs/setuptools/setuptools/_distutils/cmd.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Command:
8484
def move_file(self, src: StrPath, dst: _StrPathT, level: Unused = 1) -> _StrPathT | str: ...
8585
@overload
8686
def move_file(self, src: BytesPath, dst: _BytesPathT, level: Unused = 1) -> _BytesPathT | bytes: ...
87-
def spawn(self, cmd: MutableSequence[str], search_path: bool = True, level: Unused = 1) -> None: ...
87+
def spawn(self, cmd: MutableSequence[StrOrBytesPath], search_path: bool = True, level: Unused = 1) -> None: ...
8888
@overload
8989
def make_archive(
9090
self,

stubs/setuptools/setuptools/_distutils/compilers/C/base.pyi

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from _typeshed import BytesPath, Incomplete, StrPath, Unused
1+
from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
22
from collections.abc import Callable, Iterable, MutableSequence, Sequence
3+
from subprocess import _ENV
34
from typing import ClassVar, Final, Literal, TypeVar, overload
45
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
56

@@ -172,7 +173,14 @@ class Compiler:
172173
def execute(
173174
self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1
174175
) -> None: ...
175-
def spawn(self, cmd: MutableSequence[bytes | StrPath]) -> None: ...
176+
def spawn(
177+
self,
178+
cmd: MutableSequence[StrOrBytesPath],
179+
search_path: bool = True,
180+
verbose: bool = False,
181+
dry_run: bool = False,
182+
env: _ENV | None = None,
183+
) -> None: ...
176184
def mkpath(self, name: str, mode: int = 0o777) -> None: ...
177185
@overload
178186
def move_file(self, src: StrPath, dst: _StrPathT) -> _StrPathT | str: ...

stubs/setuptools/setuptools/_distutils/spawn.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from _typeshed import StrPath
1+
from _typeshed import StrOrBytesPath
22
from collections.abc import MutableSequence
33
from subprocess import _ENV
44

55
def spawn(
6-
cmd: MutableSequence[bytes | StrPath],
6+
cmd: MutableSequence[StrOrBytesPath],
77
search_path: bool = True,
88
verbose: bool = False,
99
dry_run: bool = False,

0 commit comments

Comments
 (0)