mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
small fix (#5810)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
"""User settings model."""
|
||||
from pydantic import Field
|
||||
|
||||
from openbb_core.app.model.abstract.tagged import Tagged
|
||||
@@ -8,14 +9,17 @@ from openbb_core.app.model.profile import Profile
|
||||
|
||||
|
||||
class UserSettings(Tagged):
|
||||
"""User settings."""
|
||||
|
||||
profile: Profile = Field(default_factory=Profile)
|
||||
credentials: Credentials = Field(default_factory=Credentials)
|
||||
preferences: Preferences = Field(default_factory=Preferences)
|
||||
defaults: Defaults = Field(default_factory=Defaults)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
"""Human readable representation of the object."""
|
||||
# We use the __dict__ because Credentials.model_dump() will use the serializer
|
||||
# and unmask the credentials
|
||||
return f"{self.__class__.__name__}\n\n" + "\n".join(
|
||||
f"{k}: {v}" for k, v in self.__dict__.items()
|
||||
f"{k}: {v}" for k, v in self.model_dump().items()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user