get rid of comments

This commit is contained in:
Jun-te Kim 2026-02-16 13:04:27 +00:00
parent dbba066ba5
commit 62a8f543f6

View file

@ -3,7 +3,6 @@ import os
from urllib.parse import urlencode
import pandas as pd
from difflib import SequenceMatcher
from tqdm import tqdm
from utils.logger import setup_logger
import re
from typing import Set
@ -334,22 +333,10 @@ def get_uprn_candidates(
def get_uprn_with_epc_df(
user_inputed_address: str,
epc_df: pd.DataFrame,
verbose=False,
):
"""
Return uprn (str) using a pre-fetched EPC dataframe.
This avoids calling the API multiple times for the same postcode.
Args:
user_inputed_address: The user's address string
epc_df: Pre-fetched EPC data for the postcode
return_address: Whether to return the matched address
return_EPC: Whether to return the EPC rating
return_score: Whether to return the lexiscore
Returns:
uprn (str), or tuple if return_address/return_EPC/return_score are True
Returns None if no match found, lexiscore < 0.7, or UPRN is empty
"""
if epc_df.empty:
return None