mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
Improve typing of sysconfig.get_config_var(s) (#11454)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import sys
|
||||
from collections.abc import Mapping
|
||||
from distutils.ccompiler import CCompiler
|
||||
from typing import Literal, overload
|
||||
from typing_extensions import deprecated
|
||||
|
||||
PREFIX: str
|
||||
EXEC_PREFIX: str
|
||||
@@ -10,8 +12,15 @@ project_base: str
|
||||
python_build: bool
|
||||
|
||||
def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ...
|
||||
@overload
|
||||
@deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in 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 = None) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user