Add init type hints [r] (#63192)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
0d7b531285
commit
95537166e8
17 changed files with 54 additions and 24 deletions
|
@ -11,9 +11,11 @@ from oauthlib.oauth2 import AccessDeniedError
|
|||
import requests
|
||||
from ring_doorbell import Auth, Ring
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform, __version__
|
||||
from homeassistant.core import HomeAssistant, ServiceCall, callback
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.util.async_ import run_callback_threadsafe
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -35,7 +37,7 @@ PLATFORMS = [
|
|||
]
|
||||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the Ring component."""
|
||||
if DOMAIN not in config:
|
||||
return True
|
||||
|
@ -51,7 +53,7 @@ async def async_setup(hass, config):
|
|||
return True
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry):
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up a config entry."""
|
||||
|
||||
def token_updater(token):
|
||||
|
@ -125,7 +127,7 @@ async def async_setup_entry(hass, entry):
|
|||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(hass, entry):
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload Ring entry."""
|
||||
if not await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue