convert.py: don't stringify Metadata load method output

This commit is contained in:
brian khuu 2024-05-13 11:30:48 +10:00
parent 74fe2ea7a8
commit caf5fc35b8

View file

@ -353,7 +353,7 @@ class Metadata:
source_hf_repo: Optional[str] = None source_hf_repo: Optional[str] = None
@staticmethod @staticmethod
def load(metadata_path: Path) -> "Metadata": def load(metadata_path: Path) -> Metadata:
if metadata_path is None or not metadata_path.exists(): if metadata_path is None or not metadata_path.exists():
return Metadata() return Metadata()