mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 11:07:17 +08:00
distutils & setuptools: Relax path related params (#11948)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Literal
|
||||
from _typeshed import BytesPath, StrPath
|
||||
from collections.abc import Callable, Iterable
|
||||
from distutils.file_util import _BytesPathT, _StrPathT
|
||||
from typing import Any, Literal, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_Macro: TypeAlias = tuple[str] | tuple[str, str | None]
|
||||
@@ -145,18 +147,27 @@ class CCompiler:
|
||||
extra_preargs: list[str] | None = None,
|
||||
extra_postargs: list[str] | None = None,
|
||||
) -> None: ...
|
||||
def executable_filename(self, basename: str, strip_dir: bool | Literal[0, 1] = 0, output_dir: str = "") -> str: ...
|
||||
@overload
|
||||
def executable_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = "") -> str: ...
|
||||
@overload
|
||||
def executable_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = "") -> str: ...
|
||||
def library_filename(
|
||||
self, libname: str, lib_type: str = "static", strip_dir: bool | Literal[0, 1] = 0, output_dir: str = ""
|
||||
self, libname: str, lib_type: str = "static", strip_dir: bool | Literal[0, 1] = 0, output_dir: StrPath = ""
|
||||
) -> str: ...
|
||||
def object_filenames(
|
||||
self, source_filenames: list[str], strip_dir: bool | Literal[0, 1] = 0, output_dir: str = ""
|
||||
self, source_filenames: Iterable[StrPath], strip_dir: bool | Literal[0, 1] = 0, output_dir: StrPath | None = ""
|
||||
) -> list[str]: ...
|
||||
def shared_object_filename(self, basename: str, strip_dir: bool | Literal[0, 1] = 0, output_dir: str = "") -> str: ...
|
||||
@overload
|
||||
def shared_object_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = "") -> str: ...
|
||||
@overload
|
||||
def shared_object_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = "") -> str: ...
|
||||
def execute(self, func: Callable[..., object], args: tuple[Any, ...], msg: str | None = None, level: int = 1) -> None: ...
|
||||
def spawn(self, cmd: list[str]) -> None: ...
|
||||
def mkpath(self, name: str, mode: int = 0o777) -> None: ...
|
||||
def move_file(self, src: str, dst: str) -> str: ...
|
||||
@overload
|
||||
def move_file(self, src: StrPath, dst: _StrPathT) -> _StrPathT | str: ...
|
||||
@overload
|
||||
def move_file(self, src: BytesPath, dst: _BytesPathT) -> _BytesPathT | bytes: ...
|
||||
def announce(self, msg: str, level: int = 1) -> None: ...
|
||||
def warn(self, msg: str) -> None: ...
|
||||
def debug_print(self, msg: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user