From 7bfee64b450f8d48b2fe27a5e561b455b1e6af4f Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Mon, 7 Nov 2022 15:30:28 +0500 Subject: [PATCH] Changed match to work with cython --- tui.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tui.py b/tui.py index 288b325..a6cfaa3 100644 --- a/tui.py +++ b/tui.py @@ -82,13 +82,12 @@ class App(): self.gui.orders_box.refresh() def decide_state(self): - match self.state: - case 0: - return self.search - case 1: - return self.select_item - case 2: - return self.select_order + if self.state == 0: + return self.search + elif self.state == 1: + return self.select_item + elif self.state == 2: + return self.select_order def run(self): self.show_gui()