diff --git a/src/nominatim_api/__init__.py b/src/nominatim_api/__init__.py index 242ff892..89c57b65 100644 --- a/src/nominatim_api/__init__.py +++ b/src/nominatim_api/__init__.py @@ -11,9 +11,6 @@ Classes and functions defined in this file are considered stable. Always 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) diff --git a/src/nominatim_api/result_formatting.py b/src/nominatim_api/result_formatting.py index b6d26c31..0f91b761 100644 --- a/src/nominatim_api/result_formatting.py +++ b/src/nominatim_api/result_formatting.py @@ -14,7 +14,7 @@ import importlib 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] diff --git a/src/nominatim_api/reverse.py b/src/nominatim_api/reverse.py index e0c1d118..1b06e659 100644 --- a/src/nominatim_api/reverse.py +++ b/src/nominatim_api/reverse.py @@ -20,9 +20,6 @@ from . import results as nres 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]] diff --git a/src/nominatim_api/search/__init__.py b/src/nominatim_api/search/__init__.py index 91be4253..956d91d8 100644 --- a/src/nominatim_api/search/__init__.py +++ b/src/nominatim_api/search/__init__.py @@ -7,8 +7,6 @@ """ Module for forward search. """ -# pylint: disable=useless-import-alias - from .geocoder import (ForwardGeocoder as ForwardGeocoder) from .query import (Phrase as Phrase, PhraseType as PhraseType) diff --git a/src/nominatim_api/sql/sqlalchemy_types/__init__.py b/src/nominatim_api/sql/sqlalchemy_types/__init__.py index 1383b5ee..b4f773c7 100644 --- a/src/nominatim_api/sql/sqlalchemy_types/__init__.py +++ b/src/nominatim_api/sql/sqlalchemy_types/__init__.py @@ -8,9 +8,6 @@ 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) diff --git a/src/nominatim_api/v1/classtypes.py b/src/nominatim_api/v1/classtypes.py index 3224232c..7198b412 100644 --- a/src/nominatim_api/v1/classtypes.py +++ b/src/nominatim_api/v1/classtypes.py @@ -61,7 +61,6 @@ def bbox_from_result(result: Union[ReverseResult, SearchResult]) -> Bbox: return result.bbox -# pylint: disable=line-too-long OSM_ATTRIBUTION = 'Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright' diff --git a/src/nominatim_db/clicmd/__init__.py b/src/nominatim_db/clicmd/__init__.py index 725b4d6b..6140100e 100644 --- a/src/nominatim_db/clicmd/__init__.py +++ b/src/nominatim_db/clicmd/__init__.py @@ -7,9 +7,6 @@ """ 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 diff --git a/src/nominatim_db/clicmd/admin.py b/src/nominatim_db/clicmd/admin.py index ba0b0458..85482ea4 100644 --- a/src/nominatim_db/clicmd/admin.py +++ b/src/nominatim_db/clicmd/admin.py @@ -15,10 +15,6 @@ from ..errors import UsageError 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() @@ -58,7 +54,6 @@ class AdminFuncs: 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) diff --git a/src/nominatim_db/clicmd/replication.py b/src/nominatim_db/clicmd/replication.py index ec85cc8b..da60eafe 100644 --- a/src/nominatim_db/clicmd/replication.py +++ b/src/nominatim_db/clicmd/replication.py @@ -116,7 +116,6 @@ class UpdateReplication: 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 diff --git a/src/nominatim_db/tools/special_phrases/sp_importer.py b/src/nominatim_db/tools/special_phrases/sp_importer.py index 0e0d7094..40b089a7 100644 --- a/src/nominatim_db/tools/special_phrases/sp_importer.py +++ b/src/nominatim_db/tools/special_phrases/sp_importer.py @@ -45,7 +45,6 @@ class SpecialPhraseLoader(Protocol): class SPImporter(): - # pylint: disable-msg=too-many-instance-attributes """ Class handling the process of special phrases importation into the database.