From d9fd88843920e1ce7903772ce05053a5140b9ff6 Mon Sep 17 00:00:00 2001 From: Josh Karpel Date: Wed, 26 Jun 2024 00:53:21 -0500 Subject: [PATCH] rename --- synthesize/config.py | 2 +- synthesize/model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synthesize/config.py b/synthesize/config.py index 0a2beb0..b3a28bb 100644 --- a/synthesize/config.py +++ b/synthesize/config.py @@ -216,7 +216,7 @@ def from_file(cls, file: Path) -> Config: tags = tags_from_path(str(file)) if "yaml" in tags: - return cls.parse_yaml(file.read_text()) + return cls.model_validate_yaml(file.read_text()) else: raise NotImplementedError("Currently, only YAML files are supported.") diff --git a/synthesize/model.py b/synthesize/model.py index 51c0087..1a2572d 100644 --- a/synthesize/model.py +++ b/synthesize/model.py @@ -17,5 +17,5 @@ class Model(BaseModel): ) @classmethod - def parse_yaml(cls: Type[C], y: str) -> C: + def model_validate_yaml(cls: Type[C], y: str) -> C: return cls.model_validate(yaml.safe_load(y))