File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2626from dataclasses import field
2727from pathlib import Path
2828
29- import yaml
29+ import saneyaml
3030
3131
3232@dataclass
@@ -63,7 +63,7 @@ class Project:
6363 @classmethod
6464 def from_yaml (cls , yaml_str : str ):
6565 """Create a Project object from a YAML string."""
66- data = yaml . safe_load (yaml_str )
66+ data = saneyaml . load (yaml_str )
6767
6868 # Parse dependencies
6969 dependencies = [
@@ -93,7 +93,7 @@ def from_file(cls, filepath: str | Path):
9393
9494 def to_yaml (self ) -> str :
9595 """Dump the Project object back to a YAML string."""
96- return yaml . safe_dump (asdict (self ), sort_keys = False , allow_unicode = True )
96+ return saneyaml . dump (asdict (self ))
9797
9898 def to_file (self , filepath : str | Path ):
9999 """Write the Project object to a YAML file."""
You can’t perform that action at this time.
0 commit comments