mirror of
https://github.com/lutris/lutris.git
synced 2026-04-21 06:28:11 -04:00
Python 3.14 evaluates annotations lazily (PEP 649), so unquoted annotations like `threading.Event` work even when `threading` is only imported under TYPE_CHECKING. On Python 3.10, these annotations are evaluated eagerly and raise NameError at import time. Add utils/check_annotations.py, an AST-based checker that detects unquoted annotations referencing TYPE_CHECKING-only imports, covering both bare names (`HTTPResponse`) and dotted access (`threading.Event`) — the latter being a gap in ruff's FA102 rule. Wire it into `make annotation-compat`, `make check`, and a new CI job. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>