Add person component to strict type checking (#132754)

This commit is contained in:
JJ 2025-01-13 20:11:17 +01:00 committed by GitHub
parent eaaab4ccfe
commit 504ed83ffb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View File

@ -371,6 +371,7 @@ homeassistant.components.panel_custom.*
homeassistant.components.peblar.*
homeassistant.components.peco.*
homeassistant.components.persistent_notification.*
homeassistant.components.person.*
homeassistant.components.pi_hole.*
homeassistant.components.ping.*
homeassistant.components.plugwise.*

View File

@ -280,7 +280,7 @@ class PersonStorageCollection(collection.DictStorageCollection):
return data
@callback
def _get_suggested_id(self, info: dict) -> str:
def _get_suggested_id(self, info: dict[str, str]) -> str:
"""Suggest an ID based on the config."""
return info[CONF_NAME]

10
mypy.ini generated
View File

@ -3466,6 +3466,16 @@ disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.person.*]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.pi_hole.*]
check_untyped_defs = true
disallow_incomplete_defs = true