from .base import ProcessInfo
from .config import SanitizerConfig
+
class _HousenumberSanitizer:
def __init__(self, config: SanitizerConfig) -> None:
self.filter_name = config.get_filter('convert-to-name', 'FAIL_ALL')
-
def __call__(self, obj: ProcessInfo) -> None:
if not obj.address:
return
obj.address = new_address
-
def sanitize(self, value: str) -> Iterator[str]:
""" Extract housenumbers in a regularized format from an OSM value.
if hnr:
yield from self._regularize(hnr)
-
def _regularize(self, hnr: str) -> Iterator[str]:
yield hnr