Parser fix

This commit is contained in:
nyan404 committed 2026-08-16 22:34:33 +03:00
1 parent 604de30345
commit d58a3c7e93
2 files changed
+14 -2

No files matched your search

+2
View File
@@ -47,6 +47,8 @@ class VkError(RuntimeError):
def _person(value: str) -> tuple[str, int]:
# Users often copy the example sentence together with its final period.
value = value.strip().rstrip(".!?").strip()
match = _PERSON_RE.fullmatch(value)
if not match:
raise ValueError("Укажите имя и ID в формате Имя [12345]")