X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/610f2cc254cf442c895351907be6405f03026903..2dafc4cf4fc46ea4be293a458d565fbff645ac28:/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