diff --git a/homeassistant/components/deconz/entity.py b/homeassistant/components/deconz/entity.py index 8551ad33cf5..f45c35ada44 100644 --- a/homeassistant/components/deconz/entity.py +++ b/homeassistant/components/deconz/entity.py @@ -138,7 +138,7 @@ class DeconzDevice[_DeviceT: _DeviceType](DeconzBase[_DeviceT], Entity): """Return True if device is available.""" if isinstance(self._device, PydeconzScene): return self.hub.available - return self.hub.available and self._device.reachable # type: ignore[union-attr] + return self.hub.available and self._device.reachable class DeconzSceneMixin(DeconzDevice[PydeconzScene]): diff --git a/homeassistant/components/vlc_telnet/media_player.py b/homeassistant/components/vlc_telnet/media_player.py index bede6efbf57..b95e987aef8 100644 --- a/homeassistant/components/vlc_telnet/media_player.py +++ b/homeassistant/components/vlc_telnet/media_player.py @@ -175,13 +175,13 @@ class VlcDevice(MediaPlayerEntity): # Fall back to filename. if data_info := data.get("data"): - self._attr_media_title = _get_str(data_info, "filename") + media_title = _get_str(data_info, "filename") # Strip out auth signatures if streaming local media - if (media_title := self.media_title) and ( - pos := media_title.find("?authSig=") - ) != -1: + if media_title and (pos := media_title.find("?authSig=")) != -1: self._attr_media_title = media_title[:pos] + else: + self._attr_media_title = media_title @catch_vlc_errors async def async_media_seek(self, position: float) -> None: diff --git a/mypy.ini b/mypy.ini index 62da0ef73af..4e68d6ba2fb 100644 --- a/mypy.ini +++ b/mypy.ini @@ -8,7 +8,6 @@ platform = linux plugins = pydantic.mypy show_error_codes = true follow_imports = normal -enable_incomplete_feature = NewGenericSyntax local_partial_types = true strict_equality = true no_implicit_optional = true diff --git a/requirements_test.txt b/requirements_test.txt index ec5d851dc05..5dc2b09df2c 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -11,7 +11,7 @@ astroid==3.3.4 coverage==7.6.1 freezegun==1.5.1 mock-open==1.4.0 -mypy-dev==1.12.0a3 +mypy-dev==1.12.0a5 pre-commit==3.8.0 pydantic==1.10.18 pylint==3.3.1 diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index d2aff81aa05..de42c964ddf 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -36,11 +36,9 @@ GENERAL_SETTINGS: Final[dict[str, str]] = { "plugins": "pydantic.mypy", "show_error_codes": "true", "follow_imports": "normal", - "enable_incomplete_feature": ", ".join( # noqa: FLY002 - [ - "NewGenericSyntax", - ] - ), + # "enable_incomplete_feature": ", ".join( # noqa: FLY002 + # [] + # ), # Enable some checks globally. "local_partial_types": "true", "strict_equality": "true",