From dd41ef66b94462e19e537fc73cddf655aab9b197 Mon Sep 17 00:00:00 2001 From: Didier Rodrigues Lopes Date: Tue, 7 Dec 2021 00:22:33 +0000 Subject: [PATCH] fix q on nft controller (#1032) --- .../cryptocurrency/nft/nft_controller.py | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/gamestonk_terminal/cryptocurrency/nft/nft_controller.py b/gamestonk_terminal/cryptocurrency/nft/nft_controller.py index 9a8e748bccc..dabe86e2dff 100644 --- a/gamestonk_terminal/cryptocurrency/nft/nft_controller.py +++ b/gamestonk_terminal/cryptocurrency/nft/nft_controller.py @@ -6,9 +6,6 @@ from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.menu import session from gamestonk_terminal.helper_funcs import ( EXPORT_ONLY_RAW_DATA_ALLOWED, - MENU_GO_BACK, - MENU_QUIT, - MENU_RESET, try_except, system_clear, get_flair, @@ -28,7 +25,6 @@ class NFTController: "help", "q", "quit", - "reset", ] CHOICES_COMMANDS = [ @@ -60,7 +56,6 @@ What do you want to do? ?/help show this menu again q quit this menu, and shows back to main menu quit quit to abandon the program - reset reset terminal and reload configs nftcalendar.io: today today's NFT drops @@ -73,12 +68,17 @@ nftcalendar.io: def switch(self, an_input: str): """Process and dispatch input + Parameters + ------- + an_input : str + string with input arguments + Returns ------- - MENU_GO_BACK, MENU_QUIT, MENU_RESET - MENU_GO_BACK - Show main context menu again - MENU_QUIT - Quit terminal - MENU_RESET - Reset terminal and go back to same previous menu + True, False or None + False - quit the menu + True - quit the program + None - continue in the menu """ # Empty command @@ -108,15 +108,11 @@ nftcalendar.io: def call_q(self, _): """Process Q command - quit the menu""" - return MENU_GO_BACK + return False def call_quit(self, _): - """Process Quit command - exit the program""" - return MENU_QUIT - - def call_reset(self, _): - """Process Reset command - reset the program""" - return MENU_RESET + """Process Quit command - quit the program""" + return True @try_except def call_today(self, other_args: List[str]):