X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6e89310a9285f1ad15d8002bf68f578eada367a0..a06e123d70a02f9de825e503cff6c17e2b718481:/src/nominatim_db/clicmd/convert.py?ds=inline diff --git a/src/nominatim_db/clicmd/convert.py b/src/nominatim_db/clicmd/convert.py index 51db848c..275dda3d 100644 --- a/src/nominatim_db/clicmd/convert.py +++ b/src/nominatim_db/clicmd/convert.py @@ -12,13 +12,9 @@ import argparse import asyncio from pathlib import Path -from nominatim_core.errors import UsageError +from ..errors import UsageError 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 class WithAction(argparse.Action): """ Special action that saves a list of flags, given on the command-line @@ -43,7 +39,6 @@ class WithAction(argparse.Action): super().__init__(full_option_strings, argparse.SUPPRESS, nargs=0, **kwargs) - def __call__(self, parser: argparse.ArgumentParser, namespace: argparse.Namespace, values: Union[str, Sequence[Any], None], option_string: Optional[str] = None) -> None: @@ -81,7 +76,6 @@ class ConvertDB: group.add_argument('--details', action=WithAction, dest_set=self.options, default=True, help='Enable/disable support for details API (default: enabled)') - def run(self, args: NominatimArgs) -> int: if args.output.exists(): raise UsageError(f"File '{args.output}' already exists. Refusing to overwrite.")