Skip to content

Commit 4e4de7f

Browse files
authored
sysconfig: Add get_default_scheme and get_preferred_scheme (#8265)
1 parent 38015e1 commit 4e4de7f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/sysconfig.pyi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import sys
12
from typing import IO, Any, overload
3+
from typing_extensions import Literal
24

35
__all__ = [
46
"get_config_h_filename",
@@ -20,6 +22,11 @@ def get_config_vars() -> dict[str, Any]: ...
2022
@overload
2123
def get_config_vars(arg: str, *args: str) -> list[Any]: ...
2224
def get_scheme_names() -> tuple[str, ...]: ...
25+
26+
if sys.version_info >= (3, 10):
27+
def get_default_scheme() -> str: ...
28+
def get_preferred_scheme(key: Literal["prefix", "home", "user"]) -> str: ...
29+
2330
def get_path_names() -> tuple[str, ...]: ...
2431
def get_path(name: str, scheme: str = ..., vars: dict[str, Any] | None = ..., expand: bool = ...) -> str: ...
2532
def get_paths(scheme: str = ..., vars: dict[str, Any] | None = ..., expand: bool = ...) -> dict[str, str]: ...

0 commit comments

Comments
 (0)