mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-08 13:05:13 +08:00
Correctly parse 2-digit minor versions (py3.10)
This commit is contained in:
1 parent
caadf3bf4c
commit
34b8b7dd79
3 files changed
+23
-2
No files matched your search
+1
-1
@@ -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".')
|
||||
|
||||
Reference in new issue
Block a user