X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c4f22a42eba499ed1854c5967b2e3932fe9b3896..46a10cf8146e16d9da7bb21e5976d9c62b69fdd1:/nominatim/tokenizer/sanitizers/strip_brace_terms.py diff --git a/nominatim/tokenizer/sanitizers/strip_brace_terms.py b/nominatim/tokenizer/sanitizers/strip_brace_terms.py index f8cdd035..119d5693 100644 --- a/nominatim/tokenizer/sanitizers/strip_brace_terms.py +++ b/nominatim/tokenizer/sanitizers/strip_brace_terms.py @@ -9,12 +9,17 @@ This sanitizer creates additional name variants for names that have addendums in brackets (e.g. "Halle (Saale)"). The additional variant contains only the main name part with the bracket part removed. """ +from typing import Callable -def create(_): +from nominatim.tokenizer.sanitizers.base import ProcessInfo +from nominatim.tokenizer.sanitizers.config import SanitizerConfig + + +def create(_: SanitizerConfig) -> Callable[[ProcessInfo], None]: """ Create a name processing function that creates additional name variants for bracket addendums. """ - def _process(obj): + def _process(obj: ProcessInfo) -> None: """ Add variants for names that have a bracket extension. """ if obj.names: