From 83f258508e32f45c33f42f774dd1c6c369122c24 Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Sun, 17 May 2026 08:47:11 -0400 Subject: [PATCH] stub: add RepeatedLabelError to __init__.pyi The class exists at runtime in __init__.py but the .pyi added in #371 omits it, so catching usaddress.RepeatedLabelError now triggers a reportAttributeAccessIssue under pyright and attr-defined under mypy. Downstream users have been working around it with type: ignore. Closes #407. Signed-off-by: Charlie Tonneslan --- usaddress/__init__.pyi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usaddress/__init__.pyi b/usaddress/__init__.pyi index 80e3a47..929ce1e 100644 --- a/usaddress/__init__.pyi +++ b/usaddress/__init__.pyi @@ -1,5 +1,14 @@ import typing +import probableparsing + +class RepeatedLabelError(probableparsing.RepeatedLabelError): + REPO_URL: str + DOCS_URL: str + message: str + original_string: str + parsed_string: list[tuple[str, str]] + def parse(address_string: str) -> list[tuple[str, str]]: """ Split an address string into components, and label each component.