Add type hints to get_scanner/async_get_scanner (#63836)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
d76d9f9e42
commit
caff3e0630
24 changed files with 116 additions and 24 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Support for OpenWRT (luci) routers."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from openwrt_luci_rpc import OpenWrtRpc
|
||||
|
@ -16,7 +18,9 @@ from homeassistant.const import (
|
|||
CONF_USERNAME,
|
||||
CONF_VERIFY_SSL,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -34,7 +38,7 @@ PLATFORM_SCHEMA = PARENT_PLATFORM_SCHEMA.extend(
|
|||
)
|
||||
|
||||
|
||||
def get_scanner(hass, config):
|
||||
def get_scanner(hass: HomeAssistant, config: ConfigType) -> DeviceScanner | None:
|
||||
"""Validate the configuration and return a Luci scanner."""
|
||||
scanner = LuciDeviceScanner(config[DOMAIN])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue