import from this file, not from the source files directly.
"""
-# See also https://github.com/PyCQA/pylint/issues/6006
-# pylint: disable=useless-import-alias
-
from .errors import (UsageError as UsageError)
from .config import (Configuration as Configuration)
from .server.content_types import CONTENT_JSON
-T = TypeVar('T') # pylint: disable=invalid-name
+T = TypeVar('T')
FormatFunc = Callable[[T, Mapping[str, Any]], str]
ErrorFormatFunc = Callable[[str, str, int], str]
from .logging import log
from .types import AnyPoint, DataLayer, ReverseDetails, GeometryFormat, Bbox
-# In SQLAlchemy expression which compare with NULL need to be expressed with
-# the equal sign.
-# pylint: disable=singleton-comparison
RowFunc = Callable[[Optional[SaRow], Type[nres.ReverseResult]], Optional[nres.ReverseResult]]
"""
Module for forward search.
"""
-# pylint: disable=useless-import-alias
-
from .geocoder import (ForwardGeocoder as ForwardGeocoder)
from .query import (Phrase as Phrase,
PhraseType as PhraseType)
Module with custom types for SQLAlchemy
"""
-# See also https://github.com/PyCQA/pylint/issues/6006
-# pylint: disable=useless-import-alias
-
from .geometry import (Geometry as Geometry)
from .int_array import (IntArray as IntArray)
from .key_value import (KeyValueStore as KeyValueStore)
return result.bbox
-# pylint: disable=line-too-long
OSM_ATTRIBUTION = 'Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright'
"""
Subcommand definitions for the command-line tool.
"""
-# mypy and pylint disagree about the style of explicit exports,
-# see https://github.com/PyCQA/pylint/issues/6006.
-# pylint: disable=useless-import-alias
from .setup import SetupAll as SetupAll
from .replication import UpdateReplication as UpdateReplication
from ..db.connection import connect, table_exists
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()
help='Analyse indexing of the given Nominatim object')
def run(self, args: NominatimArgs) -> int:
- # pylint: disable=too-many-return-statements
if args.warm:
return self._warm(args)
return update_interval
async def _update(self, args: NominatimArgs) -> None:
- # pylint: disable=too-many-locals
from ..tools import replication
from ..indexer.indexer import Indexer
from ..tokenizer import factory as tokenizer_factory
class SPImporter():
- # pylint: disable-msg=too-many-instance-attributes
"""
Class handling the process of special phrases importation into the database.