diff --git a/app/converter/regex_heuristics.py b/app/converter/regex_heuristics.py index dcae31c..ed7d913 100644 --- a/app/converter/regex_heuristics.py +++ b/app/converter/regex_heuristics.py @@ -1,9 +1,14 @@ +import dataclasses import re -from collections import namedtuple +from typing import Callable from app import utils -RegexCallback = namedtuple("RegexCallback", ["callback", "name"]) + +@dataclasses.dataclass +class RegexCallback: + callback: Callable[[re.Match], str] + name: str class RegexHeuristics: