diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17e095a5a3c7..31efe745be3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.244' + rev: 'v0.0.247' hooks: - id: ruff - repo: https://github.com/codespell-project/codespell diff --git a/openbb_terminal/session/sdk_session.py b/openbb_terminal/session/sdk_session.py index eac33ad98ecc..3606885662cc 100644 --- a/openbb_terminal/session/sdk_session.py +++ b/openbb_terminal/session/sdk_session.py @@ -11,11 +11,11 @@ def get_session(email: str, password: str, token: str, save: bool): if token: console.print("Creating session from token.") - session = session_model.create_session_from_token(token, save) + session = session_model.create_session_from_token(token, save) # type: ignore if not session: console.print("Creating session from email and password.") - session = session_model.create_session(email, password, save) + session = session_model.create_session(email, password, save) # type: ignore if not (isinstance(session, dict) and session): raise Exception("Failed to create session.") diff --git a/openbb_terminal/session/session_model.py b/openbb_terminal/session/session_model.py index b7a4787b98c6..94c4fc15fe71 100644 --- a/openbb_terminal/session/session_model.py +++ b/openbb_terminal/session/session_model.py @@ -1,6 +1,6 @@ import json from enum import Enum -from typing import Optional +from typing import Any, Optional import matplotlib.pyplot as plt @@ -25,7 +25,7 @@ class LoginStatus(Enum): UNAUTHORIZED = "unauthorized" -def create_session(email: str, password: str, save: bool) -> dict: +def create_session(email: str, password: str, save: bool) -> dict[Any, Any]: """Create a session. Parameters @@ -44,7 +44,7 @@ def create_session(email: str, password: str, save: bool) -> dict: return session -def create_session_from_token(token: str, save: bool) -> dict: +def create_session_from_token(token: str, save: bool) -> dict[Any, Any]: """Create a session from token. Parameters diff --git a/website/generate_sdk_markdown.py b/website/generate_sdk_markdown.py index ed15267acf82..0f625ab8263c 100644 --- a/website/generate_sdk_markdown.py +++ b/website/generate_sdk_markdown.py @@ -6,9 +6,9 @@ from typing import Any, Dict, Literal, Optional, Union from docstring_parser import parse -from website.controller_doc_classes import sub_names_full as subnames from openbb_terminal.sdk_core.trailmap import Trailmap, get_trailmaps +from website.controller_doc_classes import sub_names_full as subnames website_path = Path(__file__).parent.absolute()