mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 21:42:22 +00:00
removing unnecessary credentials variable cc @montezdesousa
This commit is contained in:
@@ -60,7 +60,6 @@ class OBBject(Tagged, Generic[T]):
|
||||
default_factory=dict,
|
||||
description="Extra info.",
|
||||
)
|
||||
_credentials: ClassVar[Optional[BaseModel]] = None
|
||||
_user_settings: ClassVar[Optional[BaseModel]] = None
|
||||
_system_settings: ClassVar[Optional[BaseModel]] = None
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ class Container:
|
||||
|
||||
def __init__(self, command_runner: CommandRunner) -> None:
|
||||
self._command_runner = command_runner
|
||||
OBBject._credentials = command_runner.user_settings.credentials
|
||||
OBBject._user_settings = command_runner.user_settings
|
||||
OBBject._system_settings = command_runner.system_settings
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class Example:
|
||||
self._obbject = obbject
|
||||
|
||||
def hello(self):
|
||||
api_key = self._obbject._credentials.some_api_key.get_secret_value()
|
||||
api_key = self._obbject._user_settings.credentials.some_api_key.get_secret_value()
|
||||
print(f"Hello, this is my credential: {api_key}!")
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user