mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 05:52:23 +00:00
* simplifying the way we deal with the SystemModel by removing the need for system.json file * removing the responsability of supression from the controllers * supressing logs on reports * fix etf report * supressing logs on dashboards * black * typo * ruff * pylint * refacotr def extract_parameters --------- Co-authored-by: James Maslek <jmaslek11@gmail.com>
23 lines
584 B
Python
23 lines
584 B
Python
# IMPORTS STANDARD
|
|
from copy import deepcopy
|
|
|
|
# IMPORTS INTERNAL
|
|
from openbb_terminal.core.models import SystemModel
|
|
from openbb_terminal.core.session.env_handler import read_env
|
|
from openbb_terminal.core.session.utils import load_dict_to_model
|
|
|
|
|
|
def get_current_system() -> SystemModel:
|
|
"""Get current system."""
|
|
return deepcopy(__system)
|
|
|
|
|
|
def set_current_system(system: SystemModel):
|
|
"""Set current system."""
|
|
global __system # pylint: disable=global-statement
|
|
__system = system
|
|
|
|
|
|
__env_dict = read_env()
|
|
__system = load_dict_to_model(__env_dict, SystemModel)
|