mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Address PR review (dancafc): - introduce UprnMatch NamedTuple (datatypes/address_match.py) for the (uprn, address, lexiscore, certificate_number) return, replacing the bare 4-tuple in get_uprn_from_epc_df / get_uprn_from_historic_epc / HistoricEpcResolver.resolve_uprn. Tuple-compatible, so unpacking is unchanged. - rename get_uprn_with_epc_df -> get_uprn_from_epc_df (+ callers). - type resolve_group_ambiguity via a GroupDecision NamedTuple and trim its docstring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
346 B
Python
13 lines
346 B
Python
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]
|