Improve structuring by defining TypedDicts and util classes here

This commit is contained in:
Emma Nora Theuer 2024-12-31 02:26:18 +01:00
parent bc5d07925f
commit 5e84b81c7f

25
src/wallman_classes.py Normal file
View file

@ -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]