X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6e89310a9285f1ad15d8002bf68f578eada367a0..ae8694a6a6862d7cb66cd91102d2802c9899e7cf:/src/nominatim_db/tools/special_phrases/sp_csv_loader.py diff --git a/src/nominatim_db/tools/special_phrases/sp_csv_loader.py b/src/nominatim_db/tools/special_phrases/sp_csv_loader.py index 9f472e68..9556b884 100644 --- a/src/nominatim_db/tools/special_phrases/sp_csv_loader.py +++ b/src/nominatim_db/tools/special_phrases/sp_csv_loader.py @@ -13,9 +13,10 @@ from typing import Iterable import csv import os -from nominatim_core.errors import UsageError +from ...errors import UsageError from .special_phrase import SpecialPhrase + class SPCsvLoader: """ Handles loading of special phrases from external csv file. @@ -23,7 +24,6 @@ class SPCsvLoader: def __init__(self, csv_path: str) -> None: self.csv_path = csv_path - def generate_phrases(self) -> Iterable[SpecialPhrase]: """ Open and parse the given csv file. Create the corresponding SpecialPhrases. @@ -35,7 +35,6 @@ class SPCsvLoader: for row in reader: yield SpecialPhrase(row['phrase'], row['class'], row['type'], row['operator']) - def _check_csv_validity(self) -> None: """ Check that the csv file has the right extension.