Add usersettings stub files (#10598)

This commit is contained in:
Andrés Ignacio Torres
2023-08-21 12:27:48 -07:00
committed by GitHub
parent 114949b5ad
commit 2c15a8e790
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
usersettings.Settings.app_id
usersettings.Settings.settings_directory
usersettings.Settings.settings_file

View File

@@ -0,0 +1,2 @@
version = "1.1.*"
upstream_repository = "https://github.com/glvnst/usersettings"

View File

@@ -0,0 +1,14 @@
from typing import Any, TypeVar
_S = TypeVar("_S")
class Settings(dict[str, Any]):
app_id: str
settings_directory: str
settings_file: str
def __init__(self, app_id: str) -> None: ...
def add_setting(self, setting_name: str, setting_type: type[_S] = ..., default: _S | None = None) -> None: ...
def load_settings(self) -> None: ...
def save_settings(self) -> None: ...
def __getattr__(self, setting_name: str) -> Any: ...
def __setattr__(self, setting_name: str, setting_value: Any) -> None: ...