fix(palace_graph): defer annotation eval for Python 3.9 compat

``def _normalize_wing(wing: str | None) -> str | None`` uses PEP 604
union syntax which requires Python 3.10+ at runtime. The project still
declares ``python_requires=">=3.9"`` and CI runs the test-linux (3.9)
matrix, where every test in ``tests/test_palace_graph*`` errors out
before collection with ``TypeError: unsupported operand type(s) for |``.

Added ``from __future__ import annotations`` so all annotations in
this module are evaluated lazily as strings — the union syntax is then
accepted on 3.9 without needing to rewrite to ``Optional[str]``.

Surfaced after rebasing this PR onto current develop.
This commit is contained in:
igorls
2026-04-27 03:15:09 -03:00
parent 347464146d
commit 342270d6e5
+5
View File
@@ -15,6 +15,11 @@ Enables queries like:
No external graph DB needed — built from ChromaDB metadata.
"""
# PEP 604 (``str | None``) needs 3.10+ at runtime; the project still
# supports 3.9, so defer annotation evaluation to keep the union syntax
# working on the older interpreter.
from __future__ import annotations
import hashlib
import json
import logging