Fixing exit command on forecast menu (#3421)

* adding additional exit to queue

* changing forecast controller

Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
James Simmons
2022-11-16 10:56:35 -05:00
committed by GitHub
parent daad177673
commit 8e18d47298
2 changed files with 7 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ warnings.simplefilter("ignore")
logger = logging.getLogger(__name__)
# pylint: disable=E1123
# pylint: disable=E1123,E1137
def precision_format(best_model: str, index: str, val: float) -> str:

View File

@@ -227,6 +227,12 @@ class ForecastController(BaseController):
self.completer = NestedCompleter.from_nested_dict(choices)
self.update_runtime_choices()
def call_exit(self, _) -> None:
"""Process exit terminal command from forecast menu."""
self.save_class()
for _ in range(self.PATH.count("/") + 1):
self.queue.insert(0, "quit")
def update_runtime_choices(self):
# Load in any newly exported files
self.DATA_FILES = forecast_model.get_default_files()