X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6bc044d9c7d0f849aeba4e5ffae0a3828d5fa010..e1dc4379e0cd100200ac53752442143ca4846fc5:/src/nominatim_db/clicmd/refresh.py diff --git a/src/nominatim_db/clicmd/refresh.py b/src/nominatim_db/clicmd/refresh.py index 74141165..1d1977d2 100644 --- a/src/nominatim_db/clicmd/refresh.py +++ b/src/nominatim_db/clicmd/refresh.py @@ -18,13 +18,10 @@ from ..db.connection import connect, table_exists from ..tokenizer.base import AbstractTokenizer from .args import NominatimArgs -# Do not repeat documentation of subcommand classes. -# pylint: disable=C0111 -# Using non-top-level imports to avoid eventually unused imports. -# pylint: disable=E0012,C0415 LOG = logging.getLogger() + def _parse_osm_object(obj: str) -> Tuple[str, int]: """ Parse the given argument into a tuple of OSM type and ID. Raises an ArgumentError if the format is not recognized. @@ -86,8 +83,7 @@ class UpdateRefresh: group.add_argument('--enable-debug-statements', action='store_true', help='Enable debug warning statements in functions') - - def run(self, args: NominatimArgs) -> int: #pylint: disable=too-many-branches, too-many-statements + def run(self, args: NominatimArgs) -> int: from ..tools import refresh, postcodes from ..indexer.indexer import Indexer @@ -131,7 +127,7 @@ class UpdateRefresh: LOG.warning('Import secondary importance raster data from %s', args.project_dir) if refresh.import_secondary_importance(args.config.get_libpq_dsn(), - args.project_dir) > 0: + args.project_dir) > 0: LOG.fatal('FATAL: Cannot update secondary importance raster data') return 1 need_function_refresh = True @@ -173,7 +169,6 @@ class UpdateRefresh: return 0 - def _get_tokenizer(self, config: Configuration) -> AbstractTokenizer: if self.tokenizer is None: from ..tokenizer import factory as tokenizer_factory