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

This commit is contained in:
Avasam
2024-02-22 12:52:41 -05:00
committed by GitHub
parent a2095002e4
commit 3c08a97656
3 changed files with 26 additions and 4 deletions

View File

@@ -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: ...