|
Some checks failed
CI / backend-tests (push) Has been cancelled
CI / frontend-tests (push) Has been cancelled
CI / openapi-codegen-check (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / changes (pull_request) Has been cancelled
CI / backend-tests (pull_request) Has been cancelled
CI / frontend-tests (pull_request) Has been cancelled
CI / openapi-codegen-check (pull_request) Has been cancelled
Replace (?<!\d)/(?!\d) lookarounds on the digit block in _INN_RE with (?<!\w)/(?!\w). The old (?<!\d) did not block alpha-prefixed tokens (e.g. «ИНН ref7707083893»), and (?!\d) did not block alpha-suffixed tokens (e.g. «ИНН 7707083893more»). \b is unsuitable here because Python \w covers both letters and digits, so there is no \b boundary between an alpha char and a digit char. The (?<!\w)/(?!\w) pair correctly anchors the 10/12-digit INN block to non-word boundaries on both sides. Context anchor and checksum gate from #1640 are unchanged. Adds 6 regression tests covering: alpha-prefix, alpha-suffix, embedded mid-token, 12-digit alpha-prefix, punctuation separator (should match), and end-of-string (should match). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| client.py | ||
| prompts.py | ||
| provider.py | ||
| redaction.py | ||