Skip to content

Commit

Permalink
Other mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaslek committed Feb 16, 2023
1 parent 1514112 commit a0f3ad1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions openbb_terminal/session/sdk_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
6 changes: 3 additions & 3 deletions openbb_terminal/session/session_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from enum import Enum
from typing import Optional
from typing import Any, Optional

import matplotlib.pyplot as plt

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/generate_sdk_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit a0f3ad1

Please sign in to comment.