mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 01:41:17 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user