diff --git a/.strict-typing b/.strict-typing index b27475b69a1..b79b50fd9cb 100644 --- a/.strict-typing +++ b/.strict-typing @@ -138,6 +138,7 @@ homeassistant.components.dhcp.* homeassistant.components.diagnostics.* homeassistant.components.discovergy.* homeassistant.components.dlna_dmr.* +homeassistant.components.dlna_dms.* homeassistant.components.dnsip.* homeassistant.components.doorbird.* homeassistant.components.dormakaba_dkey.* diff --git a/homeassistant/components/dlna_dms/dms.py b/homeassistant/components/dlna_dms/dms.py index 62ff2be7d5b..54cca744360 100644 --- a/homeassistant/components/dlna_dms/dms.py +++ b/homeassistant/components/dlna_dms/dms.py @@ -332,7 +332,7 @@ class DmsDeviceSource: @property def usn(self) -> str: """Get the USN (Unique Service Name) for the wrapped UPnP device end-point.""" - return self.config_entry.data[CONF_DEVICE_ID] + return self.config_entry.data[CONF_DEVICE_ID] # type: ignore[no-any-return] @property def udn(self) -> str: @@ -347,7 +347,7 @@ class DmsDeviceSource: @property def source_id(self) -> str: """Return a unique ID (slug) for this source for people to use in URLs.""" - return self.config_entry.data[CONF_SOURCE_ID] + return self.config_entry.data[CONF_SOURCE_ID] # type: ignore[no-any-return] @property def icon(self) -> str | None: diff --git a/homeassistant/components/dlna_dms/media_source.py b/homeassistant/components/dlna_dms/media_source.py index c1245997c7a..399398fa5b9 100644 --- a/homeassistant/components/dlna_dms/media_source.py +++ b/homeassistant/components/dlna_dms/media_source.py @@ -25,7 +25,7 @@ from .const import DOMAIN, LOGGER, PATH_OBJECT_ID_FLAG, ROOT_OBJECT_ID, SOURCE_S from .dms import DidlPlayMedia, get_domain_data -async def async_get_media_source(hass: HomeAssistant): +async def async_get_media_source(hass: HomeAssistant) -> DmsMediaSource: """Set up DLNA DMS media source.""" LOGGER.debug("Setting up DLNA media sources") return DmsMediaSource(hass) diff --git a/mypy.ini b/mypy.ini index e3bcca10837..62ad39da8e2 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1141,6 +1141,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.dlna_dms.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.dnsip.*] check_untyped_defs = true disallow_incomplete_defs = true