X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c14df55a61d71f2476c8a17287e1bd162a5c6a6..1f0796778754d8df0dfab9dd01302e26a397f064:/src/nominatim_db/tokenizer/sanitizers/config.py diff --git a/src/nominatim_db/tokenizer/sanitizers/config.py b/src/nominatim_db/tokenizer/sanitizers/config.py index 034d0791..1e624b09 100644 --- a/src/nominatim_db/tokenizer/sanitizers/config.py +++ b/src/nominatim_db/tokenizer/sanitizers/config.py @@ -20,6 +20,7 @@ if TYPE_CHECKING: else: _BaseUserDict = UserDict + class SanitizerConfig(_BaseUserDict): """ The `SanitizerConfig` class is a read-only dictionary with configuration options for the sanitizer. @@ -61,7 +62,6 @@ class SanitizerConfig(_BaseUserDict): return values - def get_bool(self, param: str, default: Optional[bool] = None) -> bool: """ Extract a configuration parameter as a boolean. @@ -82,7 +82,6 @@ class SanitizerConfig(_BaseUserDict): return value - def get_delimiter(self, default: str = ',;') -> Pattern[str]: """ Return the 'delimiters' parameter in the configuration as a compiled regular expression that can be used to split strings on @@ -105,7 +104,6 @@ class SanitizerConfig(_BaseUserDict): return re.compile('\\s*[{}]+\\s*'.format(''.join('\\' + d for d in delimiter_set))) - def get_filter(self, param: str, default: Union[str, Sequence[str]] = 'PASS_ALL' ) -> Callable[[str], bool]: """ Returns a filter function for the given parameter of the sanitizer