From a8cbd2c4206ab7be5c54b3ce0e7e835a4713a901 Mon Sep 17 00:00:00 2001 From: Lukas Melninkas Date: Fri, 10 Jul 2026 18:26:46 +0300 Subject: [PATCH] Support general state highways --- pyap/source_US/data.py | 6 +++++- tests/test_parser_us.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pyap/source_US/data.py b/pyap/source_US/data.py index 0d0493e..9ad1263 100644 --- a/pyap/source_US/data.py +++ b/pyap/source_US/data.py @@ -270,7 +270,11 @@ def state_highway_abbrvs_regex() -> str: # Some states name their state-maintained highways by the state abbreviation # and the number. -numbered_state_highway = r"""(?:{states}\ \d{{1,4}}(?!\d))""".format( +numbered_state_highway = r""" + (?:{states}\ \d{{1,4}}(?!\d)) + | + (?:[Ss][Tt][Aa][Tt][Ee]\s[Hh][Ww][Yy]\s\d{{1,4}}(?!\d)) +""".format( states=state_highway_abbrvs_regex() ) diff --git a/tests/test_parser_us.py b/tests/test_parser_us.py index f9de30f..36e7f84 100644 --- a/tests/test_parser_us.py +++ b/tests/test_parser_us.py @@ -436,6 +436,7 @@ def test_po_box_positive(input, expected): "input,expected", [ # positive assertions + ("700 STATE HWY 121, STE 200", True), ("10354 Smoothwater Dr Site 142", True), ("2101 W. STATE ROAD 434\nSUITE 315", True), ("14001 E. ILIFF AVE 5-7TH FLOOR", True),