Skip to content

Commit

Permalink
remove deprecated yaml.safe_load function
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Feb 16, 2024
1 parent bfc870c commit 4d33438
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spyglass/position/v1/position_dlc_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ def make(self, key):
raise OSError(f"config_path {config_path} does not exist.")
if config_path.suffix in (".yml", ".yaml"):
with open(config_path, "rb") as f:
dlc_config = yaml.safe_load(f)
safe_yaml = yaml.YAML(typ="safe", pure=True)
dlc_config = safe_yaml.load(f)
if isinstance(params["params"], dict):
dlc_config.update(params["params"])
del params["params"]
Expand Down

0 comments on commit 4d33438

Please sign in to comment.