fix Python 3.9 compatibility (str | None union syntax)

parser.py and update_mods.py were missing
'from __future__ import annotations', causing a TypeError on
Python < 3.10 when the X | Y union syntax is evaluated at runtime.
All other modules already had the import.

Also lowers MIN_PYTHON from 3.11 to 3.9 -- the toolchain does not
use any Python 3.10/3.11-specific stdlib features beyond the union
annotation syntax which is now handled by the future import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
revernomad17
2026-04-07 16:16:38 +07:00
parent 86a6ab9b01
commit da9e7782d6
3 changed files with 5 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ Typical usage::
presets = parse_modlist_dir("modlist_html")
"""
from __future__ import annotations
import re
import xml.etree.ElementTree as ET
from pathlib import Path