Improve typing of sysconfig.get_config_var(s) (#11454)

This commit is contained in:
Avasam authored and GitHub committed 2024-02-22 09:52:41 -08:00
1 parent a2095002e4
commit 3c08a97656
3 files changed
+26 -4

No files matched your search

@@ -1,12 +1,20 @@
from collections.abc import Mapping
from typing import Literal, overload
from typing_extensions import deprecated
from setuptools._distutils.ccompiler import CCompiler
PREFIX: str
EXEC_PREFIX: str
@overload
@deprecated("SO is deprecated, use EXT_SUFFIX. Support will be removed when this module is synchronized with stdlib Python 3.11")
def get_config_var(name: Literal["SO"]) -> int | str | None: ...
@overload
def get_config_var(name: str) -> int | str | None: ...
def get_config_vars(*args: str) -> Mapping[str, int | str]: ...
@overload
def get_config_vars() -> dict[str, str | int]: ...
@overload
def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
def get_config_h_filename() -> str: ...
def get_makefile_filename() -> str: ...
def get_python_inc(plat_specific: bool = ..., prefix: str | None = ...) -> str: ...