Files
OpenBB/openbb_terminal/core/session/current_system.py
Henrique Joaquim f87154beb8 Handling log supression (#4625)
* 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>
2023-03-31 08:40:14 +00:00

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)