This commit is contained in:
Kovid Goyal 2023-09-12 15:27:56 +05:30
commit 5889311688
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -948,7 +948,7 @@ def parse_go_version(x: str) -> Tuple[int, int, int]:
def safe_int(x: str) -> int:
with suppress(ValueError):
return int(x)
return int(re.split(r'[a-zA-Z]', x)[0])
return int(re.split(r'[-a-zA-Z]', x)[0])
ans = list(map(safe_int, x.split('.')))
while len(ans) < 3:
ans.append(0)