Allow empty config settings for settings loader if only loading is needed

This commit is contained in:
Clemens Schwaighofer
2025-08-26 14:38:55 +09:00
parent cbd39ff161
commit f8ae6609c7
3 changed files with 5 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ class SettingsLoader:
def load_settings(
self,
config_id: str,
config_validate: dict[str, list[str]],
config_validate: dict[str, list[str]] | None = None,
allow_not_exist: bool = False
) -> dict[str, str]:
"""
@@ -97,6 +97,8 @@ class SettingsLoader:
settings: dict[str, dict[str, Any]] = {
config_id: {},
}
if config_validate is None:
config_validate = {}
if self.config_parser is not None:
try:
# load all data as is, validation is done afterwards