From e90eb4388dc8e56da727368f4943d869001ef6b7 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Tue, 13 Feb 2024 14:54:08 +0000 Subject: [PATCH] adjustments --- openbb_terminal/base_platform_controller.py | 3 +++ openbb_terminal/terminal_controller.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/openbb_terminal/base_platform_controller.py b/openbb_terminal/base_platform_controller.py index 2f5d058cc36..0dcbe162978 100644 --- a/openbb_terminal/base_platform_controller.py +++ b/openbb_terminal/base_platform_controller.py @@ -1,4 +1,5 @@ """Platform Equity Controller.""" + __docformat__ = "numpy" import logging @@ -32,6 +33,8 @@ class PlatformController(BaseController): super().__init__(queue) self._name = name + self.translators = translators + if translators: self._generate_commands(translators=translators) self.CHOICES_COMMANDS = translators.keys() diff --git a/openbb_terminal/terminal_controller.py b/openbb_terminal/terminal_controller.py index 419c7610031..7d34196005a 100644 --- a/openbb_terminal/terminal_controller.py +++ b/openbb_terminal/terminal_controller.py @@ -141,8 +141,22 @@ class TerminalController(BaseController): self.update_success = False + self._generate_platform_commands() + self.update_runtime_choices() + def _generate_platform_commands(self): + from openbb import obb + + # 1. add menu to CHOICES_MENU + # 2. Inject mt.add_menu() into print_help() + + # from openbb_terminal.poc_platform_equity_controller import ( + # PocPlatformEquityController, + # ) + + # self.queue = self.load_class(PocPlatformEquityController, "equity", self.queue) + def update_runtime_choices(self): """Update runtime choices.""" if session and get_current_user().preferences.USE_PROMPT_TOOLKIT: