|
1 | 1 | from PIL import Image, ImageDraw |
| 2 | +from PiFinder.composite_object import CompositeObject |
2 | 3 | from PiFinder.ui.base import UIModule |
3 | 4 | from PiFinder.db.objects_db import ObjectsDatabase |
4 | 5 | from PiFinder.ui.object_list import UIObjectList |
5 | 6 | from PiFinder.ui.ui_utils import format_number |
6 | 7 | import time |
7 | 8 | import threading |
8 | 9 | from typing import Any, TYPE_CHECKING |
| 10 | +import logging |
| 11 | + |
9 | 12 |
|
10 | 13 | if TYPE_CHECKING: |
11 | 14 |
|
@@ -105,7 +108,7 @@ def __init__(self, *args, **kwargs) -> None: |
105 | 108 | self.KEYPRESS_TIMEOUT = 1 |
106 | 109 | self.last_key_press_time = 0 |
107 | 110 | self.char_index = 0 |
108 | | - self.search_results = [] |
| 111 | + self.search_results: list[CompositeObject] = [] |
109 | 112 | self.search_results_len_str = "0" |
110 | 113 | self.show_keypad = True |
111 | 114 | self.keys = KeyPad() |
@@ -231,8 +234,6 @@ def update_search_results(self): |
231 | 234 | Debounced async search - waits 250ms after last keystroke before searching. |
232 | 235 | Only updates search results in search mode. |
233 | 236 | """ |
234 | | - import logging |
235 | | - |
236 | 237 | logger = logging.getLogger("TextEntry") |
237 | 238 |
|
238 | 239 | if self.text_entry_mode: |
@@ -271,8 +272,6 @@ def _perform_search(self, search_text, search_version): |
271 | 272 | Perform the actual search in background thread. |
272 | 273 | Only updates results if this search version is still current. |
273 | 274 | """ |
274 | | - import logging |
275 | | - |
276 | 275 | logger = logging.getLogger("TextEntry") |
277 | 276 |
|
278 | 277 | try: |
|
0 commit comments