Correctly parse 2-digit minor versions (py3.10)

This commit is contained in:
Batuhan Taskaya authored and Dave Halter committed 2020-05-21 16:21:22 +02:00
1 parent caadf3bf4c
commit 34b8b7dd79
3 files changed
+23 -2

No files matched your search

+1 -1
View File
@@ -129,7 +129,7 @@ def version_info():
def _parse_version(version):
match = re.match(r'(\d+)(?:\.(\d)(?:\.\d+)?)?$', version)
match = re.match(r'(\d+)(?:\.(\d{1,2})(?:\.\d+)?)?$', version)
if match is None:
raise ValueError('The given version is not in the right format. '
'Use something like "3.8" or "3".')