]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix linting issues
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 20 Jan 2022 15:00:23 +0000 (16:00 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 20 Jan 2022 15:00:23 +0000 (16:00 +0100)
nominatim/tokenizer/sanitizers/clean_housenumbers.py
nominatim/tokenizer/sanitizers/split_name_list.py
nominatim/tokenizer/sanitizers/tag_analyzer_by_language.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
 
 
index b2a2045fd645c8ce8c42af33c2c8f74fcfcc240e..13921c3e104385f27489b4404034e523aa389ef3 100644 (file)
@@ -11,7 +11,6 @@ Arguments:
     delimiters: Define the set of characters to be used for
                 splitting the list. (default: ',;')
 """
     delimiters: Define the set of characters to be used for
                 splitting the list. (default: ',;')
 """
-from nominatim.errors import UsageError
 from nominatim.tokenizer.sanitizers.helpers import create_split_regex
 
 def create(func):
 from nominatim.tokenizer.sanitizers.helpers import create_split_regex
 
 def create(func):
index 964a90162b1a49cf6e32fbace4f57d8614be2d6b..cbf32179f504ed9f9a535fd432e1c3c0d2a526c6 100644 (file)
@@ -30,8 +30,6 @@ Arguments:
           any analyzer tagged) is retained. (default: replace)
 
 """
           any analyzer tagged) is retained. (default: replace)
 
 """
-import re
-
 from nominatim.tools import country_info
 from nominatim.tokenizer.sanitizers.helpers import create_kind_filter
 
 from nominatim.tools import country_info
 from nominatim.tokenizer.sanitizers.helpers import create_kind_filter