diff --git a/backend/address2UPRN/main.py b/backend/address2UPRN/main.py index a7378fbe..6b684cef 100644 --- a/backend/address2UPRN/main.py +++ b/backend/address2UPRN/main.py @@ -60,7 +60,7 @@ def get_uprn_from_historic_epc( except FileNotFoundError: return None - uprn = result.unambiguous_uprn() + uprn: Optional[str] = result.unambiguous_uprn() if not uprn or uprn in ("", "nan"): return None diff --git a/scripts/historic_epc_demo.py b/scripts/historic_epc_demo.py index b47c3a3c..31e1ee28 100644 --- a/scripts/historic_epc_demo.py +++ b/scripts/historic_epc_demo.py @@ -12,6 +12,7 @@ Usage: import sys from datatypes.epc.domain.historic_epc_matching import match_addresses_for_postcode +from typing import Optional def main(user_address: str, postcode: str) -> None: @@ -29,7 +30,7 @@ def main(user_address: str, postcode: str) -> None: ) print() - uprn = result.unambiguous_uprn() + uprn: Optional[str] = result.unambiguous_uprn() if uprn: print(f"Unambiguous UPRN: {uprn}") else: