mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
fix: ensure integer indices for list slicing in repomap.py
This commit is contained in:
parent
e94b05851f
commit
392fb21946
1 changed files with 2 additions and 2 deletions
|
@ -605,7 +605,7 @@ class RepoMap:
|
||||||
|
|
||||||
self.tree_cache = dict()
|
self.tree_cache = dict()
|
||||||
|
|
||||||
middle = min(max_map_tokens // 25, num_tags)
|
middle = min(int(max_map_tokens // 25), num_tags)
|
||||||
while lower_bound <= upper_bound:
|
while lower_bound <= upper_bound:
|
||||||
# dump(lower_bound, middle, upper_bound)
|
# dump(lower_bound, middle, upper_bound)
|
||||||
|
|
||||||
|
@ -628,7 +628,7 @@ class RepoMap:
|
||||||
else:
|
else:
|
||||||
upper_bound = middle - 1
|
upper_bound = middle - 1
|
||||||
|
|
||||||
middle = (lower_bound + upper_bound) // 2
|
middle = int((lower_bound + upper_bound) // 2)
|
||||||
|
|
||||||
spin.end()
|
spin.end()
|
||||||
return best_tree
|
return best_tree
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue