From c15c22655b6d232be51570d490fa625ce6471e21 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 26 Apr 2022 20:39:42 +0200 Subject: [PATCH] Enable strict typing [fritzbox_callmonitor] (#70815) --- .strict-typing | 1 + homeassistant/components/fritzbox_callmonitor/base.py | 2 +- .../components/fritzbox_callmonitor/const.py | 4 ++-- mypy.ini | 11 +++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.strict-typing b/.strict-typing index 31f5c12205a..cda4f9e12fc 100644 --- a/.strict-typing +++ b/.strict-typing @@ -86,6 +86,7 @@ homeassistant.components.flunearyou.* homeassistant.components.flux_led.* homeassistant.components.forecast_solar.* homeassistant.components.fritzbox.* +homeassistant.components.fritzbox_callmonitor.* homeassistant.components.fronius.* homeassistant.components.frontend.* homeassistant.components.fritz.* diff --git a/homeassistant/components/fritzbox_callmonitor/base.py b/homeassistant/components/fritzbox_callmonitor/base.py index 6114e4b1fed..386e60ba199 100644 --- a/homeassistant/components/fritzbox_callmonitor/base.py +++ b/homeassistant/components/fritzbox_callmonitor/base.py @@ -65,7 +65,7 @@ class FritzBoxPhonebook: def get_phonebook_ids(self) -> list[int]: """Return list of phonebook ids.""" - return self.fph.phonebook_ids + return self.fph.phonebook_ids # type: ignore[no-any-return] def get_name(self, number: str) -> str: """Return a name for a given phone number.""" diff --git a/homeassistant/components/fritzbox_callmonitor/const.py b/homeassistant/components/fritzbox_callmonitor/const.py index 73a900e3570..9939a73bc18 100644 --- a/homeassistant/components/fritzbox_callmonitor/const.py +++ b/homeassistant/components/fritzbox_callmonitor/const.py @@ -41,5 +41,5 @@ DOMAIN: Final = "fritzbox_callmonitor" MANUFACTURER: Final = "AVM" PLATFORMS = [Platform.SENSOR] -UNDO_UPDATE_LISTENER = "undo_update_listener" -FRITZBOX_PHONEBOOK = "fritzbox_phonebook" +UNDO_UPDATE_LISTENER: Final = "undo_update_listener" +FRITZBOX_PHONEBOOK: Final = "fritzbox_phonebook" diff --git a/mypy.ini b/mypy.ini index c4b66473342..6010475602d 100644 --- a/mypy.ini +++ b/mypy.ini @@ -748,6 +748,17 @@ no_implicit_optional = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.fritzbox_callmonitor.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +no_implicit_optional = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.fronius.*] check_untyped_defs = true disallow_incomplete_defs = true