From 4a78883ce45ae5ba10dd663be79c0caa56fecdc6 Mon Sep 17 00:00:00 2001 From: Stefano Braghin <527806+stefano81@users.noreply.github.com> Date: Sat, 16 May 2026 22:19:49 +0100 Subject: [PATCH] fix: clean up more Signed-off-by: Stefano Braghin <527806+stefano81@users.noreply.github.com> --- .../classification/identifiers/us_postal_address.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/risk_assessment/classification/identifiers/us_postal_address.py b/src/risk_assessment/classification/identifiers/us_postal_address.py index e829c4e..d36cc03 100644 --- a/src/risk_assessment/classification/identifiers/us_postal_address.py +++ b/src/risk_assessment/classification/identifiers/us_postal_address.py @@ -1,4 +1,4 @@ -from re import Pattern +import re import re2 @@ -650,7 +650,7 @@ class USPostalAddress(Identifier): def __init__(self) -> None: options = re2.Options() options.case_sensitive = False - self.patterns: list[Pattern[str]] = [ + self.patterns = [ re2.compile( r"^(?:" + r"(?:" @@ -767,8 +767,6 @@ def _check_that_case_is_consistent(text: str) -> bool: bool: True if all alphabetic initial letters are consistently upper or lower case, False if mixed case is detected """ - import re - # Split on whitespace and commas using proper regex tokens = re.split(r"[\s,]+", text)