From 64ea23707128ab1c2e70c32d142f0563decddcfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rudowicz?= Date: Sun, 8 Sep 2024 17:20:47 +0200 Subject: [PATCH] flake8 fixes --- menu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu.py b/menu.py index 5580913..2609cb9 100644 --- a/menu.py +++ b/menu.py @@ -105,7 +105,6 @@ class MenuBoard(IBoard): current_button_row += 1 yield pygame.Rect(left, top, button_width, button_height) - def handle_event(self, event: pygame.event.Event): for b in self.buttons: b.handle_event(event) @@ -134,11 +133,14 @@ class App: def button_press_handler(self, text: str) -> Callable[[], None]: def impl(): previous_board = self.board + def thr_fun(): def end_thr(): self.board = previous_board + sleep(5) self.task_q.put(end_thr) + process_thr = Thread(target=thr_fun) process_thr.start() self.board = MessageBoard(self.get_screen_rect(), f"Wait: {text}")