mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Enable strict typing for dlna_dms (#107305)
This commit is contained in:
parent
d0e6ce193c
commit
3632d6be46
@ -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.*
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
10
mypy.ini
10
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user