🐛 | Fix prefetch bug (str vs int), move json import to module level, add missing type hints
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s
This commit is contained in:
@@ -84,13 +84,13 @@ def save_volume(volume: int) -> None:
|
||||
save_config(dict(SETTINGS))
|
||||
|
||||
|
||||
def save_setting(key: str, value) -> None:
|
||||
def save_setting(key: str, value: object) -> None:
|
||||
"""Persist a single setting and update the in-memory SETTINGS dict."""
|
||||
SETTINGS[key] = value
|
||||
save_config(dict(SETTINGS))
|
||||
|
||||
|
||||
def get_setting(key: str):
|
||||
def get_setting(key: str) -> object:
|
||||
"""Return a setting value from the in-memory dict."""
|
||||
return SETTINGS.get(key, DEFAULT_CONFIG.get(key))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user