mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
* adding BaseModel * initial version of the system model * creating setup functions and removing constants from config_terminal * removing log_supress const * fix test * merge * system handler * fix import * centralized configs setup * repr to use the BaseModel * updating i18n dict location * ignoring warning on wrong type-var * ruff * Update openbb_terminal/core/models/system_model.py Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * Update openbb_terminal/core/models/system_model.py Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * import literal * loading env files before the plot backend is called * fix tests/openbb_terminal/test_terminal_helper.py * tests need to have i18n initialized * fix seeking_alpha tests --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
22 lines
511 B
Python
22 lines
511 B
Python
# IMPORTS STANDARD
|
|
from copy import deepcopy
|
|
|
|
# IMPORTS INTERNAL
|
|
from openbb_terminal.core.models import SystemModel
|
|
from openbb_terminal.core.session.system_handler import handle_system, save_system
|
|
|
|
|
|
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
|
|
save_system(system)
|
|
__system = system
|
|
|
|
|
|
__system = handle_system()
|