From c6789d70a4e2d5a01d3938277577115c5e931bfd Mon Sep 17 00:00:00 2001 From: Arie Catsman <120491684+catsmanac@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:26:35 +0100 Subject: [PATCH] Remove unneeded type for enphase_envoy coordinator in async_unload_entry (#133817) --- homeassistant/components/enphase_envoy/__init__.py | 2 +- homeassistant/components/enphase_envoy/quality_scale.yaml | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/enphase_envoy/__init__.py b/homeassistant/components/enphase_envoy/__init__.py index f4fe4aff2cb..cdbb7080674 100644 --- a/homeassistant/components/enphase_envoy/__init__.py +++ b/homeassistant/components/enphase_envoy/__init__.py @@ -77,7 +77,7 @@ async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: async def async_unload_entry(hass: HomeAssistant, entry: EnphaseConfigEntry) -> bool: """Unload a config entry.""" - coordinator: EnphaseUpdateCoordinator = entry.runtime_data + coordinator = entry.runtime_data coordinator.async_cancel_token_refresh() return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) diff --git a/homeassistant/components/enphase_envoy/quality_scale.yaml b/homeassistant/components/enphase_envoy/quality_scale.yaml index 210491c031c..a7038b4e0da 100644 --- a/homeassistant/components/enphase_envoy/quality_scale.yaml +++ b/homeassistant/components/enphase_envoy/quality_scale.yaml @@ -35,11 +35,7 @@ rules: comment: no events used. entity-unique-id: done has-entity-name: done - runtime-data: - status: done - comment: | - async_unload_entry- coordinator: EnphaseUpdateCoordinator = entry.runtime_data - You can remove the EnphaseUpdateCoordinator as the type can now be inferred thanks to the typed config entry + runtime-data: done test-before-configure: done test-before-setup: done unique-config-entry: done