Use a default regex when possible (#205)

This commit is contained in:
Marc Wrobel
2023-12-01 21:08:11 +01:00
parent e97e261946
commit 750faaa64f
10 changed files with 20 additions and 35 deletions

View File

@@ -5,13 +5,12 @@ import sys
from common import endoflife
METHOD = "maven"
VERSION_REGEX = r'^\d+\.\d+(\.\d+)?$'
# TODO: Add support for custom regexes
# Hasn't been needed yet, so only write if we need it
def valid_version(version):
if re.match(VERSION_REGEX, version):
if re.match(endoflife.DEFAULT_VERSION_REGEX, version):
return True
return False