mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added type hinting to uprn
This commit is contained in:
parent
5edae06a65
commit
c22528299c
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue