Skip to content

Commit 68f14d3

Browse files
committed
try to see if moving yaml is still necessary.
1 parent 8ae4081 commit 68f14d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

optimade/server/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
8787
import json
8888
import os
8989

90+
import yaml
91+
9092
encoding = settings.__config__.env_file_encoding
9193
config_file = Path(os.getenv("OPTIMADE_CONFIG_FILE", DEFAULT_CONFIG_FILE_PATH))
9294

@@ -98,8 +100,6 @@ def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
98100
res = json.loads(config_file_content)
99101
except json.JSONDecodeError as json_exc:
100102
try:
101-
import yaml
102-
103103
# This can essentially also load JSON files, as JSON is a subset of YAML v1,
104104
# but I suspect it is not as rigorous
105105
res = yaml.safe_load(config_file_content)

0 commit comments

Comments
 (0)