Skip to content

Commit f880131

Browse files
committed
Fix mypy errors
1 parent 08b7615 commit f880131

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

python/PiFinder/ui/textentry.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
from PIL import Image, ImageDraw
2+
from PiFinder.composite_object import CompositeObject
23
from PiFinder.ui.base import UIModule
34
from PiFinder.db.objects_db import ObjectsDatabase
45
from PiFinder.ui.object_list import UIObjectList
56
from PiFinder.ui.ui_utils import format_number
67
import time
78
import threading
89
from typing import Any, TYPE_CHECKING
10+
import logging
11+
912

1013
if TYPE_CHECKING:
1114

@@ -105,7 +108,7 @@ def __init__(self, *args, **kwargs) -> None:
105108
self.KEYPRESS_TIMEOUT = 1
106109
self.last_key_press_time = 0
107110
self.char_index = 0
108-
self.search_results = []
111+
self.search_results: list[CompositeObject] = []
109112
self.search_results_len_str = "0"
110113
self.show_keypad = True
111114
self.keys = KeyPad()
@@ -231,8 +234,6 @@ def update_search_results(self):
231234
Debounced async search - waits 250ms after last keystroke before searching.
232235
Only updates search results in search mode.
233236
"""
234-
import logging
235-
236237
logger = logging.getLogger("TextEntry")
237238

238239
if self.text_entry_mode:
@@ -271,8 +272,6 @@ def _perform_search(self, search_text, search_version):
271272
Perform the actual search in background thread.
272273
Only updates results if this search version is still current.
273274
"""
274-
import logging
275-
276275
logger = logging.getLogger("TextEntry")
277276

278277
try:

0 commit comments

Comments
 (0)