diff --git a/pyproject.toml b/pyproject.toml index 791cfad..8862f4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stellarismodparser" -version = "1.0.6" +version = "1.0.7" authors = [ { name="cswimr", email="seaswimmerthefsh@gmail.com" }, ] diff --git a/stellarismodparser/stellarismodparser.py b/stellarismodparser/stellarismodparser.py index 4a932af..ed71d61 100644 --- a/stellarismodparser/stellarismodparser.py +++ b/stellarismodparser/stellarismodparser.py @@ -106,11 +106,13 @@ class Mod: supported_version: Optional[StellarisVersion] = None remote_file_id: Optional[int] = None - def __post_init__(self): + def __post_init__(self) -> None: if self.tags and len(self.tags) > 10: logger.warning("Mod %s has more than 10 tags. This will prevent the mod from being uploaded to the Steam Workshop and Paradox Mods.", self.name) if self.supported_version and isinstance(self.supported_version, str): - self.supported_version = StellarisVersion.parse(self.supported_version) + if self.supported_version.startswith("v"): + self.supported_version = self.supported_version[1:] + self.supported_version = StellarisVersion.parse(version=self.supported_version) def __str__(self) -> str: return self.name