Skip to content

Commit

Permalink
Fixed the mypy ignore
Browse files Browse the repository at this point in the history
Signed-off-by: Toomore Chiang <[email protected]>
  • Loading branch information
toomore committed Jun 8, 2024
1 parent d37a3d3 commit ab84104
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion models/oauth_db.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
''' oauth database '''
from typing import Any

from google.oauth2.credentials import Credentials # type: ignore
# type: ignore[unused-ignore]
from google.oauth2.credentials import Credentials

from models.base import DBBase

Expand Down
4 changes: 2 additions & 2 deletions module/gsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
from typing import Any, Generator, Union

from google.oauth2 import service_account # type: ignore
from google.oauth2 import service_account # type: ignore[unused-ignore]
from googleapiclient import errors # type: ignore
from googleapiclient.discovery import build # type:ignore

Expand All @@ -26,7 +26,7 @@ class GSuite:
)

def __init__(self, credentialfile: str, with_subject: str):
creds = service_account.Credentials.from_service_account_file(
creds = service_account.Credentials.from_service_account_file( # type: ignore[no-untyped-call]
credentialfile, scopes=self.SCOPES).with_subject(with_subject)

self.service = build('admin', 'directory_v1',
Expand Down
3 changes: 2 additions & 1 deletion module/oauth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
''' OAuth '''
from typing import Any, Optional

from google.oauth2.credentials import Credentials # type: ignore
# type: ignore[unused-ignore]
from google.oauth2.credentials import Credentials

from models.oauth_db import OAuthDB

Expand Down

0 comments on commit ab84104

Please sign in to comment.