]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tokenizer/sanitizers/clean_housenumbers.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / nominatim / tokenizer / sanitizers / clean_housenumbers.py
index 85af903bedb4b63831ef0cd6a4c8b487bdc85e58..49f9b4f05c6c14c237e46c76d99be6711abeff23 100644 (file)
@@ -37,7 +37,8 @@ class _HousenumberSanitizer:
         new_address = []
         for item in obj.address:
             if self.filter_kind(item):
         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)
             else:
                 # Don't touch other address items.
                 new_address.append(item)
@@ -56,7 +57,8 @@ class _HousenumberSanitizer:
                 yield from self._regularize(hnr)
 
 
                 yield from self._regularize(hnr)
 
 
-    def _regularize(self, hnr):
+    @staticmethod
+    def _regularize(hnr):
         yield hnr
 
 
         yield hnr