mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
feat: setup wizard (WIP)
This commit is contained in:
1 parent
f0e51fa758
commit
07ea73ef2e
17 files changed
+839
-61
No files matched your search
@@ -4,6 +4,9 @@ from dzgui.const.enum import Preferences
|
||||
from dzgui.config.query import get_config, enum_to_key
|
||||
from dzgui.util._json import write_json
|
||||
|
||||
# TODO: drop deprecated
|
||||
|
||||
|
||||
# TEST: parametrize writing config values and checking config output in test
|
||||
def toggle_config(path: Path, key: Preferences) -> None:
|
||||
real_key = enum_to_key(key)
|
||||
@@ -15,6 +18,7 @@ def toggle_config(path: Path, key: Preferences) -> None:
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
|
||||
def write_config(path: Path, key: Preferences, value: str) -> None:
|
||||
real_key = enum_to_key(key)
|
||||
try:
|
||||
|
||||
@@ -14,6 +14,5 @@ class UserPrefs:
|
||||
is_debug: bool
|
||||
coords: Union["Coords", None]
|
||||
version: str
|
||||
allow_updates: bool
|
||||
paths: "Xdg"
|
||||
use_miles: bool
|
||||
Reference in new issue
Block a user