Move settings.json into constant

Move settings.json into a constant so that they can later be referred to
by the testing module.
This commit is contained in:
deeplow 2024-02-29 11:16:34 +00:00 committed by Alex Pyrgiotis
parent ad16a0e471
commit dfcb10c494
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -13,6 +13,8 @@ log = logging.getLogger(__name__)
if TYPE_CHECKING:
from .logic import DangerzoneCore
SETTINGS_FILENAME: str = "settings.json"
class Settings:
settings: Dict[str, Any]
@ -20,7 +22,7 @@ class Settings:
def __init__(self, dangerzone: "DangerzoneCore") -> None:
self.dangerzone = dangerzone
self.settings_filename = os.path.join(
self.dangerzone.appdata_path, "settings.json"
self.dangerzone.appdata_path, SETTINGS_FILENAME
)
self.default_settings: Dict[str, Any] = self.generate_default_settings()
self.load()