X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6e89310a9285f1ad15d8002bf68f578eada367a0..4cce681ead77ff2e5bdee2e7f1695162c805bbb5:/src/nominatim_db/clicmd/special_phrases.py?ds=inline diff --git a/src/nominatim_db/clicmd/special_phrases.py b/src/nominatim_db/clicmd/special_phrases.py index 1e0f2d76..9ba751a0 100644 --- a/src/nominatim_db/clicmd/special_phrases.py +++ b/src/nominatim_db/clicmd/special_phrases.py @@ -11,19 +11,16 @@ import argparse import logging from pathlib import Path -from nominatim_core.errors import UsageError -from nominatim_core.db.connection import connect +from ..errors import UsageError +from ..db.connection import connect from ..tools.special_phrases.sp_importer import SPImporter, SpecialPhraseLoader from ..tools.special_phrases.sp_wiki_loader import SPWikiLoader from ..tools.special_phrases.sp_csv_loader import SPCsvLoader from .args import NominatimArgs + LOG = logging.getLogger() -# Do not repeat documentation of subcommand classes. -# pylint: disable=C0111 -# Using non-top-level imports to avoid eventually unused imports. -# pylint: disable=E0012,C0415 class ImportSpecialPhrases: """\ @@ -62,7 +59,6 @@ class ImportSpecialPhrases: group.add_argument('--no-replace', action='store_true', help='Keep the old phrases and only add the new ones') - def run(self, args: NominatimArgs) -> int: if args.import_from_wiki: @@ -77,7 +73,6 @@ class ImportSpecialPhrases: return 0 - def start_import(self, args: NominatimArgs, loader: SpecialPhraseLoader) -> None: """ Create the SPImporter object containing the right