fix(mm): HFModelSource string format

The dunder `__str__` method for `HFModelSource` was appending a colon `:` to the end of the source strings.
This commit is contained in:
psychedelicious 2024-03-19 15:54:18 +11:00
parent ee3096f616
commit 429f87c60b

View File

@ -114,8 +114,10 @@ class HFModelSource(StringLikeSource):
def __str__(self) -> str:
"""Return string version of repoid when string rep needed."""
base: str = self.repo_id
base += f":{self.variant or ''}"
base += f":{self.subfolder}" if self.subfolder else ""
if self.variant:
base += f":{self.variant or ''}"
if self.subfolder:
base += f":{self.subfolder}"
return base