Remove superclass from GMail Authentication (#95001)

This commit is contained in:
Joost Lekkerkerker 2023-06-21 18:47:53 +02:00 committed by GitHub
parent 57c9aad9b1
commit 6230a51695
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View file

@ -1,25 +1,21 @@
"""API for Google Mail bound to Home Assistant OAuth."""
from aiohttp import ClientSession
from google.auth.exceptions import RefreshError
from google.oauth2.credentials import Credentials
from google.oauth2.utils import OAuthClientAuthHandler
from googleapiclient.discovery import Resource, build
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.helpers import config_entry_oauth2_flow
class AsyncConfigEntryAuth(OAuthClientAuthHandler):
class AsyncConfigEntryAuth:
"""Provide Google Mail authentication tied to an OAuth2 based config entry."""
def __init__(
self,
websession: ClientSession,
oauth2Session: config_entry_oauth2_flow.OAuth2Session,
oauth2_session: config_entry_oauth2_flow.OAuth2Session,
) -> None:
"""Initialize Google Mail Auth."""
self.oauth_session = oauth2Session
super().__init__(websession)
self.oauth_session = oauth2_session
@property
def access_token(self) -> str: