Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/redactable/detectors/regexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ def detect(self, text: str) -> Iterable[Finding]:
extras={"luhn_valid": ok, "brand": brand},
)

try:
import phonenumbers # type: ignore
except Exception: # pragma: no cover
phonenumbers = None

# --------------------------------------------------------------------
# Simple phone regex fallback
RE_PHONE = re.compile(
Expand Down Expand Up @@ -278,13 +273,6 @@ def detect(self, text: str) -> Iterable[Finding]:
extras=extras,
)

try:
from stdnum import iban as std_iban # type: ignore
from stdnum.gb import nhs as std_nhs # type: ignore
from stdnum.us import ssn as std_us_ssn # type: ignore
except Exception: # pragma: no cover
std_iban = std_nhs = std_us_ssn = None

# --------------------------------------------------------------------
# Regex patterns
RE_NHS = re.compile(r"\b(\d{3})[\s-]?(\d{3})[\s-]?(\d{4})\b")
Expand Down
Loading