X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/bc7f6209d83dcc161f093ce9907991facabb3491..1c33cb3186a38ceb5cc4de0975ae1956c861f9b5:/nominatim/tokenizer/sanitizers/clean_postcodes.py diff --git a/nominatim/tokenizer/sanitizers/clean_postcodes.py b/nominatim/tokenizer/sanitizers/clean_postcodes.py index cabacff4..5eaea391 100644 --- a/nominatim/tokenizer/sanitizers/clean_postcodes.py +++ b/nominatim/tokenizer/sanitizers/clean_postcodes.py @@ -59,7 +59,7 @@ class _PostcodeSanitizer: def scan(self, postcode: str, country: Optional[str]) -> Optional[Tuple[str, str]]: """ Check the postcode for correct formatting and return the normalized version. Returns None if the postcode does not - correspond to the oficial format of the given country. + correspond to the official format of the given country. """ match = self.matcher.match(country, postcode) if match is None: @@ -74,7 +74,7 @@ class _PostcodeSanitizer: def create(config: SanitizerConfig) -> Callable[[ProcessInfo], None]: - """ Create a housenumber processing function. + """ Create a function that filters postcodes by their officially allowed pattern. """ return _PostcodeSanitizer(config)