Skip to content

Commit

Permalink
Fix: dont throw when version has no minor digit
Browse files Browse the repository at this point in the history
  • Loading branch information
eight04 committed Nov 14, 2024
1 parent 08c78cf commit f7e8e3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vpip/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ class ProdUpdater(Updater):

def get_spec(self, name, version):
if not version.startswith("0."):
version = re.match(r"\d+\.\d+", version).group()
# FIXME: is `pywin32~=308` a valid specifier?
version = re.match(r"\d+(\.\d+)?", version).group()
return "{}~={}".format(name, version)

@classmethod
Expand Down

0 comments on commit f7e8e3e

Please sign in to comment.