fix: handle YAML null values for list config fields

PyYAML parst auskommentierte Listen als None statt []. Da der Key
vorhanden ist, greift .get(key, []) nicht. Drei Fixes:
- extractor.py, differ.py: `or []` statt Default-Argument
- config.py: _deep_update überspringt None-Override auf List-Defaults

Tritt auf bei `ignore_selectors` und `ignore_patterns` in config.yaml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-06-12 01:12:09 +02:00
commit de90dbc19c
3 changed files with 4 additions and 2 deletions

View file

@ -17,7 +17,7 @@ def normalize_text(text: str, cfg: dict) -> str:
norm_cfg = cfg.get("normalization", {})
if norm_cfg.get("collapse_whitespace", True):
text = re.sub(r"\s+", " ", text).strip()
for pattern in norm_cfg.get("ignore_patterns", []):
for pattern in (norm_cfg.get("ignore_patterns") or []):
text = re.sub(pattern, "[IGNORED]", text)
return text