add func parm type

This commit is contained in:
2025-07-12 17:33:38 +02:00
parent b1ce9061b1
commit 7edaef3563
32 changed files with 301 additions and 75 deletions

View File

@@ -1,9 +1,7 @@
import re
def extract_value(patterns: list, primary_source: str, secondary_source: str, default='Not Defined') -> str:
"""Extracts the first match for a list of patterns from the primary source.
Falls back to the secondary source if no match is found.
"""
for source in (primary_source, secondary_source):
for pattern in patterns:
matches = re.findall(pattern, source, re.IGNORECASE)