diff --git a/homeassistant/components/google_sheets/__init__.py b/homeassistant/components/google_sheets/__init__.py index 19f5ce81f5c..803b737283b 100644 --- a/homeassistant/components/google_sheets/__init__.py +++ b/homeassistant/components/google_sheets/__init__.py @@ -21,9 +21,10 @@ from homeassistant.helpers.config_entry_oauth2_flow import ( import homeassistant.helpers.config_validation as cv from homeassistant.helpers.selector import ConfigEntrySelector -from .const import DATA_CONFIG_ENTRY, DEFAULT_ACCESS, DOMAIN +from .const import DEFAULT_ACCESS, DOMAIN DATA = "data" +DATA_CONFIG_ENTRY = "config_entry" WORKSHEET = "worksheet" SERVICE_APPEND_SHEET = "append_sheet" diff --git a/homeassistant/components/google_sheets/application_credentials.py b/homeassistant/components/google_sheets/application_credentials.py index c54356b659e..52942825595 100644 --- a/homeassistant/components/google_sheets/application_credentials.py +++ b/homeassistant/components/google_sheets/application_credentials.py @@ -1,14 +1,9 @@ """application_credentials platform for Google Sheets.""" - import oauth2client from homeassistant.components.application_credentials import AuthorizationServer from homeassistant.core import HomeAssistant -AUTHORIZATION_SERVER = AuthorizationServer( - oauth2client.GOOGLE_AUTH_URI, oauth2client.GOOGLE_TOKEN_URI -) - async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer: """Return authorization server.""" diff --git a/homeassistant/components/google_sheets/const.py b/homeassistant/components/google_sheets/const.py index f8f065972f9..71ef8f4a4f4 100644 --- a/homeassistant/components/google_sheets/const.py +++ b/homeassistant/components/google_sheets/const.py @@ -1,10 +1,7 @@ """Constants for Google Sheets integration.""" from __future__ import annotations -from typing import Final - DOMAIN = "google_sheets" -DATA_CONFIG_ENTRY: Final = "config_entry" DEFAULT_NAME = "Google Sheets" DEFAULT_ACCESS = "https://www.googleapis.com/auth/drive.file" diff --git a/homeassistant/components/google_sheets/strings.json b/homeassistant/components/google_sheets/strings.json index 33230038cdf..602301758f8 100644 --- a/homeassistant/components/google_sheets/strings.json +++ b/homeassistant/components/google_sheets/strings.json @@ -4,10 +4,6 @@ "pick_implementation": { "title": "[%key:common::config_flow::title::oauth2_pick_implementation%]" }, - "reauth_confirm": { - "title": "[%key:common::config_flow::title::reauth%]", - "description": "The Google Sheets integration needs to re-authenticate your account" - }, "auth": { "title": "Link Google Account" }, diff --git a/tests/components/google_sheets/test_init.py b/tests/components/google_sheets/test_init.py index f77edcbb491..4c708544099 100644 --- a/tests/components/google_sheets/test_init.py +++ b/tests/components/google_sheets/test_init.py @@ -92,7 +92,7 @@ async def test_setup_success( assert not hass.data.get(DOMAIN) assert entries[0].state is ConfigEntryState.NOT_LOADED - assert not len(hass.services.async_services().get(DOMAIN, {})) + assert not hass.services.async_services().get(DOMAIN, {}) @pytest.mark.parametrize( @@ -125,7 +125,6 @@ async def test_missing_required_scopes_requires_reauth( async def test_expired_token_refresh_success( hass: HomeAssistant, setup_integration: ComponentSetup, - scopes: list[str], aioclient_mock: AiohttpClientMocker, ) -> None: """Test expired token is refreshed.""" @@ -168,7 +167,6 @@ async def test_expired_token_refresh_success( async def test_expired_token_refresh_failure( hass: HomeAssistant, setup_integration: ComponentSetup, - scopes: list[str], aioclient_mock: AiohttpClientMocker, status: http.HTTPStatus, expected_state: ConfigEntryState,