diff --git a/src/ez_address_parser/address_parser.py b/src/ez_address_parser/address_parser.py index 66b5dc3..c625d61 100644 --- a/src/ez_address_parser/address_parser.py +++ b/src/ez_address_parser/address_parser.py @@ -4,7 +4,7 @@ import sklearn_crfsuite -from .features import transform, load_data +from .features import load_data, transform from .utils import tokenize diff --git a/src/ez_address_parser/features.py b/src/ez_address_parser/features.py index 57804ef..f7518dc 100644 --- a/src/ez_address_parser/features.py +++ b/src/ez_address_parser/features.py @@ -1,4 +1,5 @@ from string import digits + from .constants import direction_terms, street_types, unit_designators from .utils import tokenize diff --git a/src/ez_address_parser/utils.py b/src/ez_address_parser/utils.py index 1ff90aa..b78e2b0 100644 --- a/src/ez_address_parser/utils.py +++ b/src/ez_address_parser/utils.py @@ -6,4 +6,4 @@ def tokenize(s): s = s.replace("#", " # ") - return [token for token in split(fr"[{puncts}\s]+", s) if token] + return [token for token in split(rf"[{puncts}\s]+", s) if token] diff --git a/tests/test_address_parser.py b/tests/test_address_parser.py index 267f7e2..864666b 100644 --- a/tests/test_address_parser.py +++ b/tests/test_address_parser.py @@ -1,4 +1,4 @@ -from unittest.mock import patch, Mock +from unittest.mock import Mock, patch import pytest