Examples and code quality

This commit is contained in:
Nitzan Pomerantz
2025-10-31 00:31:14 +02:00
parent e4aa6487ff
commit 739d4f8578
9 changed files with 508 additions and 27 deletions
+5 -5
View File
@@ -83,11 +83,11 @@ def is_same_building(search_address: str, deal_address: str) -> bool:
return True
# Check if one address is contained in the other (for different formats of same address)
if len(search_address) > 5 and len(deal_address) > 5:
if search_address in deal_address or deal_address in search_address:
return True
return False
return (
len(search_address) > 5
and len(deal_address) > 5
and (search_address in deal_address or deal_address in search_address)
)
def extract_floor_number(floor_str: str) -> int | None: