From 5e84b81c7f51ed438bb7eb4b5d53f4ceabcf70bb Mon Sep 17 00:00:00 2001 From: Emma Nora Theuer Date: Tue, 31 Dec 2024 02:26:18 +0100 Subject: [PATCH] Improve structuring by defining TypedDicts and util classes here --- src/wallman_classes.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/wallman_classes.py diff --git a/src/wallman_classes.py b/src/wallman_classes.py new file mode 100644 index 0000000..e788616 --- /dev/null +++ b/src/wallman_classes.py @@ -0,0 +1,25 @@ +from typing import TypedDict, List, Dict + +""" +This is where library classes, like the config error +And other utility things like TypedDicts for better +linting and type checking go. I should also consider +to move some other import here +""" + +class ConfigError(Exception): + pass + +class ConfigGeneral(TypedDict): + enable_wallpaper_sets: bool + used_sets: List[str] + wallpapers_per_set: int + notify: bool + fallback_wallpaper: str + log_level: str + systray: bool + behavior: str + +class ConfigFile(TypedDict): + general: ConfigGeneral + changing_times: Dict[str, str]