Drop regexes lib (#258)

This was needed until #227 as the Ruby script did not support multiple regexes.

Now that all regexes has been split / simplified in https://github.com/endoflife-date/endoflife.date/pull/4317 and https://github.com/endoflife-date/endoflife.date/pull/4383 the regexes lib is not needed anymore.
This commit is contained in:
Marc Wrobel
2023-12-17 22:06:16 +01:00
parent 9a306b169c
commit c9aca50729
2 changed files with 1 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import frontmatter
import json
import logging
import os
import regex as re # Python re module does not support identically named groups (as used in the mariadb product)
import re
from datetime import datetime
from glob import glob
from liquid import Template
@@ -26,7 +26,6 @@ class AutoConfig:
regexes = config.get("regex", DEFAULT_VERSION_REGEX)
regexes = regexes if isinstance(regexes, list) else [regexes]
regexes = [regex.replace("(?<", "(?P<") for regex in regexes] # convert ruby to python regex
self.version_patterns = [re.compile(regex) for regex in regexes]
def first_match(self, version: str) -> re.Match: