From 0dfeaeecaaf60bcd50c45af6f23afe3c6ff51279 Mon Sep 17 00:00:00 2001 From: praschke Date: Fri, 9 Feb 2024 10:10:16 +0000 Subject: [PATCH 1/2] fix mods missing everest version --- mons/modmeta.py | 2 +- mons/version.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mons/modmeta.py b/mons/modmeta.py index 1d21e55..4f53297 100644 --- a/mons/modmeta.py +++ b/mons/modmeta.py @@ -24,7 +24,7 @@ def __init__(self, name: str, version: t.Union[str, Version]): @classmethod def _from_dict(cls, data: t.Dict[str, t.Any]): - return cls(str(data["Name"]), str(data.get("Version", NOVERSION))) + return cls(str(data["Name"]), str(data.get("Version", NOVERSION()))) def __repr__(self) -> str: return f"{self.Name}: {self.Version}" diff --git a/mons/version.py b/mons/version.py index 57ddcc2..16a08d8 100644 --- a/mons/version.py +++ b/mons/version.py @@ -56,6 +56,8 @@ def satisfies(self, required: "Version"): # Special case: Always True if version == 0.0.* if self.Major == 0 and self.Minor == 0: return True + if required.Major == 0 and required.Minor == 0: + return True # Major version, breaking changes, must match. if self.Major != required.Major: From 150b6a97c90e113b240e635b6861c2824effedcb Mon Sep 17 00:00:00 2001 From: praschke Date: Fri, 9 Feb 2024 10:11:09 +0000 Subject: [PATCH 2/2] fix format argument --- mons/commands/mods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mons/commands/mods.py b/mons/commands/mods.py index 5c17f4f..115f3b9 100644 --- a/mons/commands/mods.py +++ b/mons/commands/mods.py @@ -1117,7 +1117,7 @@ def resolve( "{resolve_count} dependency missing", "{resolve_count} dependencies missing", len(deps_missing) + len(deps_outdated), - ).format(len(deps_missing) + len(deps_outdated)) + ).format(resolve_count=len(deps_missing) + len(deps_outdated)) if deps_outdated: msg += " or outdated" echo(msg)