Enable strict typing [fritzbox_callmonitor] (#70815)

This commit is contained in:
Marc Mueller 2022-04-26 20:39:42 +02:00 committed by GitHub
parent 997fb7a11c
commit c15c22655b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View File

@ -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.*

View File

@ -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."""

View File

@ -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"

View File

@ -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