mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Detect block-level asset conditions 🟩
This commit is contained in:
parent
3cdc871aae
commit
9ccbbafb29
1 changed files with 5 additions and 3 deletions
|
|
@ -31,9 +31,11 @@ class PeabodyAssetCondition:
|
|||
address = self.full_address.upper()
|
||||
|
||||
block_level_patterns = [
|
||||
r"\bBLOCK\b", # "BLOCK MILNE HOUSE"
|
||||
r"\bFLATS\b", # "FLATS A-D ..."
|
||||
r"\b\d+[A-Z]?-\d+[A-Z]?\b", # "1-80", "9A-9H"
|
||||
r"\bBLOCK\b", # BLOCK MILNE HOUSE
|
||||
r"\bFLATS\b", # FLATS A-D
|
||||
r"\b\d+[A-Z]?-\d+[A-Z]?\b", # 1-80, 9A-9H
|
||||
r"\b\d+[A-Z]-[A-Z]\b", # 81A-B
|
||||
r"\b\d+\s*&\s*\d+\b", # 73 & 74
|
||||
]
|
||||
|
||||
return any(re.search(pattern, address) for pattern in block_level_patterns)
|
||||
Loading…
Add table
Reference in a new issue