X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/610f2cc254cf442c895351907be6405f03026903..f5e52e748f0a4275e3238e51c47de2ddccfea0ff:/nominatim/tokenizer/sanitizers/split_name_list.py diff --git a/nominatim/tokenizer/sanitizers/split_name_list.py b/nominatim/tokenizer/sanitizers/split_name_list.py index c9db0a9d..7d0667b4 100644 --- a/nominatim/tokenizer/sanitizers/split_name_list.py +++ b/nominatim/tokenizer/sanitizers/split_name_list.py @@ -11,13 +11,18 @@ Arguments: delimiters: Define the set of characters to be used for splitting the list. (default: ',;') """ -def create(config): +from typing import Callable + +from nominatim.tokenizer.sanitizers.base import ProcessInfo +from nominatim.tokenizer.sanitizers.config import SanitizerConfig + +def create(config: SanitizerConfig) -> Callable[[ProcessInfo], None]: """ Create a name processing function that splits name values with multiple values into their components. """ regexp = config.get_delimiter() - def _process(obj): + def _process(obj: ProcessInfo) -> None: if not obj.names: return