From 7715a9d50056c5f5a7f1661c6a87fcce31720a06 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 12 Sep 2025 19:32:49 +0200 Subject: [PATCH] fix new mypy issue --- src/nominatim_db/data/place_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nominatim_db/data/place_info.py b/src/nominatim_db/data/place_info.py index 5fc6a48a..32f86c96 100644 --- a/src/nominatim_db/data/place_info.py +++ b/src/nominatim_db/data/place_info.py @@ -2,13 +2,13 @@ # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2024 by the Nominatim developer community. +# Copyright (C) 2025 by the Nominatim developer community. # For a full list of authors see the git log. """ Wrapper around place information the indexer gets from the database and hands to the tokenizer. """ -from typing import Optional, Mapping, Any, Tuple +from typing import Optional, Mapping, Any, Tuple, cast class PlaceInfo: @@ -56,7 +56,7 @@ class PlaceInfo: [1]: ../customize/Ranking.md#address-rank """ - return self._info.get('rank_address', 0) + return cast(int, self._info.get('rank_address', 0)) @property def centroid(self) -> Optional[Tuple[float, float]]: -- 2.39.5