Skip to content

Commit a8cbd2c

Browse files
committed
Support general state highways
1 parent ffac8dc commit a8cbd2c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎pyap/source_US/data.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ def state_highway_abbrvs_regex() -> str:
270270

271271
# Some states name their state-maintained highways by the state abbreviation
272272
# and the number.
273-
numbered_state_highway = r"""(?:{states}\ \d{{1,4}}(?!\d))""".format(
273+
numbered_state_highway = r"""
274+
(?:{states}\ \d{{1,4}}(?!\d))
275+
|
276+
(?:[Ss][Tt][Aa][Tt][Ee]\s[Hh][Ww][Yy]\s\d{{1,4}}(?!\d))
277+
""".format(
274278
states=state_highway_abbrvs_regex()
275279
)
276280

‎tests/test_parser_us.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ def test_po_box_positive(input, expected):
436436
"input,expected",
437437
[
438438
# positive assertions
439+
("700 STATE HWY 121, STE 200", True),
439440
("10354 Smoothwater Dr Site 142", True),
440441
("2101 W. STATE ROAD 434\nSUITE 315", True),
441442
("14001 E. ILIFF AVE 5-7TH FLOOR", True),

0 commit comments

Comments
 (0)