diff --git a/stubs/appdirs/METADATA.toml b/stubs/appdirs/METADATA.toml new file mode 100644 index 000000000000..236b9e93158c --- /dev/null +++ b/stubs/appdirs/METADATA.toml @@ -0,0 +1,2 @@ +version = "1.4.*" +upstream_repository = "https://github.com/ActiveState/appdirs" diff --git a/stubs/appdirs/appdirs.pyi b/stubs/appdirs/appdirs.pyi new file mode 100644 index 000000000000..86e9ed8e6518 --- /dev/null +++ b/stubs/appdirs/appdirs.pyi @@ -0,0 +1,63 @@ +import sys +from _typeshed import StrPath +from typing import Final, Literal + +if sys.platform == "win32": + from ctypes import windll as windll + +__version__: Final[str] +__version_info__: Final[tuple[int, int, int]] +unicode = str +system: Final[str] +PY3: Literal[True] + +def user_data_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, roaming: bool = False +) -> StrPath: ... +def site_data_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, multipath: bool = False +) -> StrPath: ... +def user_config_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, roaming: bool = False +) -> StrPath: ... +def site_config_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, multipath: bool = False +) -> StrPath: ... +def user_cache_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, opinion: bool = True +) -> StrPath: ... +def user_state_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, roaming: bool = False +) -> StrPath: ... +def user_log_dir( + appname: StrPath | None = None, appauthor: StrPath | None = None, version: StrPath | None = None, opinion: bool = True +) -> StrPath: ... + +class AppDirs: + appname: StrPath | None + appauthor: StrPath | None + version: StrPath | None + roaming: bool + multipath: bool + def __init__( + self, + appname: StrPath | None = None, + appauthor: StrPath | None = None, + version: StrPath | None = None, + roaming: bool = False, + multipath: bool = False, + ) -> None: ... + @property + def user_data_dir(self) -> StrPath: ... + @property + def site_data_dir(self) -> StrPath: ... + @property + def user_config_dir(self) -> StrPath: ... + @property + def site_config_dir(self) -> StrPath: ... + @property + def user_cache_dir(self) -> StrPath: ... + @property + def user_state_dir(self) -> StrPath: ... + @property + def user_log_dir(self) -> StrPath: ...