From dd85a1e5f0a0d07c1bfc6ced99c7dc09840fd144 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 2 Jun 2025 06:06:38 +0200 Subject: [PATCH] Update mypy-dev to 1.17.0a2 (#146002) * Update mypy-dev to 1.17.0a2 * Fix --- homeassistant/components/matter/light.py | 4 ++-- homeassistant/components/radarr/entity.py | 6 +----- requirements_test.txt | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/matter/light.py b/homeassistant/components/matter/light.py index 8ea804a8a7c..c61fd0879fa 100644 --- a/homeassistant/components/matter/light.py +++ b/homeassistant/components/matter/light.py @@ -162,7 +162,7 @@ class MatterLight(MatterEntity, LightEntity): assert level_control is not None - level = round( # type: ignore[unreachable] + level = round( renormalize( brightness, (0, 255), @@ -249,7 +249,7 @@ class MatterLight(MatterEntity, LightEntity): # We should not get here if brightness is not supported. assert level_control is not None - LOGGER.debug( # type: ignore[unreachable] + LOGGER.debug( "Got brightness %s for %s", level_control.currentLevel, self.entity_id, diff --git a/homeassistant/components/radarr/entity.py b/homeassistant/components/radarr/entity.py index bc2c17821cc..1f3e1e98c07 100644 --- a/homeassistant/components/radarr/entity.py +++ b/homeassistant/components/radarr/entity.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import cast - from homeassistant.const import ATTR_SW_VERSION from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo from homeassistant.helpers.entity import EntityDescription @@ -40,7 +38,5 @@ class RadarrEntity(CoordinatorEntity[RadarrDataUpdateCoordinator[T]]): name=self.coordinator.config_entry.title, ) if isinstance(self.coordinator, StatusDataUpdateCoordinator): - device_info[ATTR_SW_VERSION] = cast( - StatusDataUpdateCoordinator, self.coordinator - ).data.version + device_info[ATTR_SW_VERSION] = self.coordinator.data.version return device_info diff --git a/requirements_test.txt b/requirements_test.txt index 40349402c4d..01ae29fa166 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -13,7 +13,7 @@ freezegun==1.5.1 go2rtc-client==0.1.3b0 license-expression==30.4.1 mock-open==1.4.0 -mypy-dev==1.16.0a8 +mypy-dev==1.17.0a2 pre-commit==4.0.0 pydantic==2.11.3 pylint==3.3.7