Improve structuring by defining TypedDicts and util classes here
This commit is contained in:
parent
bc5d07925f
commit
5e84b81c7f
1 changed files with 25 additions and 0 deletions
25
src/wallman_classes.py
Normal file
25
src/wallman_classes.py
Normal 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]
|
Loading…
Reference in a new issue