Skip to content

Commit

Permalink
fix version pinning
Browse files Browse the repository at this point in the history
  • Loading branch information
IAlibay committed Oct 13, 2024
1 parent bbab384 commit 5724cf9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/mdakit.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,11 @@ def get_matching_version(self, max_ver: str = "3.11", min_ver: str = "3.8",

while (current_version.to_version() >= min_version.to_version()):
for spec in pin_specifiers:
# Fetch the pin version string and convert it for comparison
pin_ver = version.TargetVersion.from_str(spec.version)
compatible_version = version._operators[spec.operator](
current_version.to_string(),
spec.version,
current_version.to_version(),
pin_ver.to_version(),
)

if compatible_version:
Expand Down

0 comments on commit 5724cf9

Please sign in to comment.