Update typing 05 (#48038)
This commit is contained in:
parent
76199c0eb2
commit
7c0734bdd5
57 changed files with 315 additions and 251 deletions
|
@ -1,5 +1,5 @@
|
|||
"""Home Assistant Cast integration for Cast."""
|
||||
from typing import Optional
|
||||
from __future__ import annotations
|
||||
|
||||
from pychromecast.controllers.homeassistant import HomeAssistantController
|
||||
import voluptuous as vol
|
||||
|
@ -20,8 +20,8 @@ async def async_setup_ha_cast(
|
|||
hass: core.HomeAssistant, entry: config_entries.ConfigEntry
|
||||
):
|
||||
"""Set up Home Assistant Cast."""
|
||||
user_id: Optional[str] = entry.data.get("user_id")
|
||||
user: Optional[auth.models.User] = None
|
||||
user_id: str | None = entry.data.get("user_id")
|
||||
user: auth.models.User | None = None
|
||||
|
||||
if user_id is not None:
|
||||
user = await hass.auth.async_get_user(user_id)
|
||||
|
@ -78,7 +78,7 @@ async def async_remove_user(
|
|||
hass: core.HomeAssistant, entry: config_entries.ConfigEntry
|
||||
):
|
||||
"""Remove Home Assistant Cast user."""
|
||||
user_id: Optional[str] = entry.data.get("user_id")
|
||||
user_id: str | None = entry.data.get("user_id")
|
||||
|
||||
if user_id is not None:
|
||||
user = await hass.auth.async_get_user(user_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue