fix linting issues

This commit is contained in:
Sarah Hoffmann 2022-01-20 16:00:23 +01:00
parent f3c9578bca
commit 1e5a8561c0
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -11,7 +11,6 @@ Arguments:
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):

View File

@ -30,8 +30,6 @@ Arguments:
any analyzer tagged) is retained. (default: replace)
"""
import re
from nominatim.tools import country_info
from nominatim.tokenizer.sanitizers.helpers import create_kind_filter