From 8a2f7c6fc491a1d8e4ff39ca5f15b9d753e4f127 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:00:28 +0000 Subject: [PATCH] Add hints to get_service in tplink-lte --- homeassistant/components/tplink_lte/notify.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tplink_lte/notify.py b/homeassistant/components/tplink_lte/notify.py index 478b3e998c09a8..890a4ff6c88ac6 100644 --- a/homeassistant/components/tplink_lte/notify.py +++ b/homeassistant/components/tplink_lte/notify.py @@ -1,4 +1,6 @@ """Support for TP-Link LTE notifications.""" +from __future__ import annotations + import logging import attr @@ -6,16 +8,22 @@ from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService from homeassistant.const import CONF_RECIPIENT +from homeassistant.core import HomeAssistant +from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from . import DATA_KEY _LOGGER = logging.getLogger(__name__) -async def async_get_service(hass, config, discovery_info=None): +async def async_get_service( + hass: HomeAssistant, + config: ConfigType, + discovery_info: DiscoveryInfoType | None = None, +) -> TplinkNotifyService | None: """Get the notification service.""" if discovery_info is None: - return + return None return TplinkNotifyService(hass, discovery_info)