Enable strict typing for youtube (#107440)
parent
d8c79964c8
commit
e4ff51fa9a
|
@ -434,6 +434,7 @@ homeassistant.components.wled.*
|
|||
homeassistant.components.worldclock.*
|
||||
homeassistant.components.yale_smart_alarm.*
|
||||
homeassistant.components.yalexs_ble.*
|
||||
homeassistant.components.youtube.*
|
||||
homeassistant.components.zeroconf.*
|
||||
homeassistant.components.zodiac.*
|
||||
homeassistant.components.zone.*
|
||||
|
|
|
@ -25,7 +25,7 @@ class AsyncConfigEntryAuth:
|
|||
@property
|
||||
def access_token(self) -> str:
|
||||
"""Return the access token."""
|
||||
return self.oauth_session.token[CONF_ACCESS_TOKEN]
|
||||
return self.oauth_session.token[CONF_ACCESS_TOKEN] # type: ignore[no-any-return]
|
||||
|
||||
async def check_and_refresh_token(self) -> str:
|
||||
"""Check the token."""
|
||||
|
|
|
@ -17,7 +17,7 @@ async def async_get_config_entry_diagnostics(
|
|||
coordinator: YouTubeDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][
|
||||
COORDINATOR
|
||||
]
|
||||
sensor_data = {}
|
||||
sensor_data: dict[str, Any] = {}
|
||||
for channel_id, channel_data in coordinator.data.items():
|
||||
channel_data.get(ATTR_LATEST_VIDEO, {}).pop(ATTR_DESCRIPTION)
|
||||
sensor_data[channel_id] = channel_data
|
||||
|
|
10
mypy.ini
10
mypy.ini
|
@ -4103,6 +4103,16 @@ disallow_untyped_defs = true
|
|||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
|
||||
[mypy-homeassistant.components.youtube.*]
|
||||
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.zeroconf.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
|
Loading…
Reference in New Issue