feat(config): Clean up, add themes options
This commit is contained in:
+11
-2
@@ -6,7 +6,16 @@ from config.dtype import ArchMgrConfig
|
||||
from config.merger import merge_configs
|
||||
|
||||
|
||||
def _load_config_file(file: str):
|
||||
def load_config_file(file: str):
|
||||
"""Load and parse the config file.
|
||||
No verification is done and is not cast
|
||||
|
||||
Args:
|
||||
file: The path to the file to be loaded
|
||||
|
||||
Returns:
|
||||
The loaded and parsed file.
|
||||
"""
|
||||
with open(file, "r") as f:
|
||||
parsed = yaml.load(f, Loader=yaml.FullLoader)
|
||||
return parsed
|
||||
@@ -79,7 +88,7 @@ def load_config(file: str) -> ArchMgrConfig:
|
||||
global requires_list, source_list
|
||||
# Load and validate initial config
|
||||
try:
|
||||
loaded_conf = _load_config_file(file)
|
||||
loaded_conf = load_config_file(file)
|
||||
except Exception:
|
||||
return default_config()
|
||||
if not validator.validate(loaded_conf):
|
||||
|
||||
Reference in New Issue
Block a user