We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ae4081 commit 68f14d3Copy full SHA for 68f14d3
optimade/server/config.py
@@ -87,6 +87,8 @@ def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
87
import json
88
import os
89
90
+ import yaml
91
+
92
encoding = settings.__config__.env_file_encoding
93
config_file = Path(os.getenv("OPTIMADE_CONFIG_FILE", DEFAULT_CONFIG_FILE_PATH))
94
@@ -98,8 +100,6 @@ def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
98
100
res = json.loads(config_file_content)
99
101
except json.JSONDecodeError as json_exc:
102
try:
- import yaml
-
103
# This can essentially also load JSON files, as JSON is a subset of YAML v1,
104
# but I suspect it is not as rigorous
105
res = yaml.safe_load(config_file_content)
0 commit comments