mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 13:01:38 +00:00
* fix show version * update login prompt and account * update set preference * fix account controller * block login/logout if not called from account * change conditions to start terminal * fix required args account model * add not to login command * pylint * accounte controller messages * set default user when logout * logout then show menu * remove unused functions * fix logging bug * ruff * fix account unittests * fix session unittests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com>
31 lines
890 B
Python
31 lines
890 B
Python
import sys
|
|
from multiprocessing import freeze_support
|
|
|
|
# pylint:disable=unused-import,import-outside-toplevel
|
|
import openbb_terminal.config_terminal as cfg # noqa: F401
|
|
import openbb_terminal.core.session.current_user as _ # noqa: F401
|
|
from openbb_terminal.terminal_helper import is_auth_enabled, is_installer
|
|
|
|
|
|
def main():
|
|
sent_args = sys.argv[1:]
|
|
|
|
cfg.start_required_configurations()
|
|
|
|
if "-t" in sent_args or "--test" in sent_args:
|
|
from openbb_terminal.core.integration_tests import integration_controller
|
|
|
|
integration_controller.main()
|
|
else:
|
|
from openbb_terminal.core.session import session_controller
|
|
|
|
if is_auth_enabled() and ("--login" in sys.argv[1:] or is_installer()):
|
|
session_controller.main()
|
|
else:
|
|
session_controller.launch_terminal()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
freeze_support()
|
|
main()
|