Merge pull request #3978 from jayaddison/issue-2714-prep/index-boundaries-method-signature-nitpick

Refactor: add default params to Indexer.index_boundaries
This commit is contained in:
Sarah Hoffmann
2026-02-10 09:45:29 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ class Indexer:
if await self.index_by_rank(0, 4) > 0:
_analyze()
if await self.index_boundaries(0, 30) > 100:
if await self.index_boundaries() > 100:
_analyze()
if await self.index_by_rank(5, 25) > 100:
@@ -74,7 +74,7 @@ class Indexer:
if not self.has_pending():
break
async def index_boundaries(self, minrank: int, maxrank: int) -> int:
async def index_boundaries(self, minrank: int = 0, maxrank: int = 30) -> int:
""" Index only administrative boundaries within the given rank range.
"""
total = 0

View File

@@ -247,7 +247,7 @@ async def test_index_boundaries(test_db, threads, test_tokenizer):
assert test_db.osmline_unindexed() == 1
idx = indexer.Indexer('dbname=test_nominatim_python_unittest', test_tokenizer, threads)
await idx.index_boundaries(0, 30)
await idx.index_boundaries()
assert test_db.placex_unindexed() == 31
assert test_db.osmline_unindexed() == 1