From d4c1f8546bf76edfa2eacd3090ddeb8b2109d8b3 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Thu, 26 Jan 2023 18:14:12 +0000 Subject: [PATCH] add docstrings --- openbb_terminal/session/session_model.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/openbb_terminal/session/session_model.py b/openbb_terminal/session/session_model.py index 7a9b1050fe5..4ff4244cd26 100644 --- a/openbb_terminal/session/session_model.py +++ b/openbb_terminal/session/session_model.py @@ -10,7 +10,17 @@ from openbb_terminal.rich_config import console def create_session(email: str, password: str, save: bool) -> dict: - """Create a session.""" + """Create a session. + + Parameters + ---------- + email : str + The email. + password : str + The password. + save : bool + Save the session. + """ session = Hub.get_session(email, password) if session and save: @@ -19,7 +29,13 @@ def create_session(email: str, password: str, save: bool) -> dict: def logout(cls: bool = False): - """Logout and clear session.""" + """Logout and clear session. + + Parameters + ---------- + cls : bool + Clear the screen. + """ if cls: system_clear() User.clear() @@ -38,4 +54,4 @@ def logout(cls: bool = False): Hub.delete_session() Local.remove_session_file() plt.close("all") - console.print("[green]\nLogout successful[/green]") + console.print("[green]\nLogout successful.[/green]")