mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-27 06:51:42 +03:00
fix linting issues
This commit is contained in:
parent
f3c9578bca
commit
1e5a8561c0
@ -37,7 +37,8 @@ class _HousenumberSanitizer:
|
|||||||
new_address = []
|
new_address = []
|
||||||
for item in obj.address:
|
for item in obj.address:
|
||||||
if self.filter_kind(item):
|
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:
|
else:
|
||||||
# Don't touch other address items.
|
# Don't touch other address items.
|
||||||
new_address.append(item)
|
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
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ Arguments:
|
|||||||
delimiters: Define the set of characters to be used for
|
delimiters: Define the set of characters to be used for
|
||||||
splitting the list. (default: ',;')
|
splitting the list. (default: ',;')
|
||||||
"""
|
"""
|
||||||
from nominatim.errors import UsageError
|
|
||||||
from nominatim.tokenizer.sanitizers.helpers import create_split_regex
|
from nominatim.tokenizer.sanitizers.helpers import create_split_regex
|
||||||
|
|
||||||
def create(func):
|
def create(func):
|
||||||
|
@ -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.tools import country_info
|
||||||
from nominatim.tokenizer.sanitizers.helpers import create_kind_filter
|
from nominatim.tokenizer.sanitizers.helpers import create_kind_filter
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user