X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f3c9578bcaf8a1981b160b14809e9dc1377cfb37..690f9ec06fd7a08b41de027427d8a1d3d0e3ff2e:/nominatim/tokenizer/sanitizers/clean_housenumbers.py diff --git a/nominatim/tokenizer/sanitizers/clean_housenumbers.py b/nominatim/tokenizer/sanitizers/clean_housenumbers.py index 85af903b..49f9b4f0 100644 --- a/nominatim/tokenizer/sanitizers/clean_housenumbers.py +++ b/nominatim/tokenizer/sanitizers/clean_housenumbers.py @@ -37,7 +37,8 @@ class _HousenumberSanitizer: new_address = [] for item in obj.address: if self.filter_kind(item): - new_address.extend(item.clone(kind='housenumber', name=n) for n in self.sanitize(item.name)) + new_address.extend(item.clone(kind='housenumber', name=n) + for n in self.sanitize(item.name)) else: # Don't touch other address items. new_address.append(item) @@ -56,7 +57,8 @@ class _HousenumberSanitizer: yield from self._regularize(hnr) - def _regularize(self, hnr): + @staticmethod + def _regularize(hnr): yield hnr