-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathconfig.py
40 lines (25 loc) · 1002 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""Load configuration settings for protonfixes"""
from dataclasses import dataclass
from pathlib import Path
from .config_base import ConfigBase
class Config(ConfigBase):
"""Configuration for umu-protonfix"""
@dataclass
class MainSection:
"""General parameters
Attributes:
enable_checks (bool): Run checks (`checks.py`) before the fix is executed.
enable_global_fixes (bool): Enables included fixes. If deactivated, only local fixes (`~/.config/protonfixes/localfixes`) are executed.
"""
enable_checks: bool = True
enable_global_fixes: bool = True
@dataclass
class PathSection:
"""Path parameters
Attributes:
cache_dir (Path): The path that should be used to create temporary and cached files.
"""
cache_dir: Path = Path.home() / '.cache/protonfixes'
main: MainSection
path: PathSection
config = Config(Path.home() / '.config/protonfixes/config.ini')