from __future__ import annotations from typing import NamedTuple, Optional class UprnMatch(NamedTuple): """A confident address→UPRN match from either EPC source (new API or historic). Tuple-compatible, so existing unpacking keeps working.""" uprn: str address: str lexiscore: float certificate_number: Optional[str]