From faa2129e96e5c19e984450bfbbf4f19132189b14 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 30 Dec 2023 14:32:44 +0100 Subject: [PATCH] Mark todo entity component as strictly typed (#106718) --- .strict-typing | 1 + homeassistant/components/todo/intent.py | 2 +- mypy.ini | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.strict-typing b/.strict-typing index 75a08cb9e09..a2adc5b0de4 100644 --- a/.strict-typing +++ b/.strict-typing @@ -351,6 +351,7 @@ homeassistant.components.threshold.* homeassistant.components.tibber.* homeassistant.components.tile.* homeassistant.components.tilt_ble.* +homeassistant.components.todo.* homeassistant.components.tolo.* homeassistant.components.tplink.* homeassistant.components.tplink_omada.* diff --git a/homeassistant/components/todo/intent.py b/homeassistant/components/todo/intent.py index 4cf62c6391d..2cce9da9c0f 100644 --- a/homeassistant/components/todo/intent.py +++ b/homeassistant/components/todo/intent.py @@ -22,7 +22,7 @@ class ListAddItemIntent(intent.IntentHandler): intent_type = INTENT_LIST_ADD_ITEM slot_schema = {"item": cv.string, "name": cv.string} - async def async_handle(self, intent_obj: intent.Intent): + async def async_handle(self, intent_obj: intent.Intent) -> intent.IntentResponse: """Handle the intent.""" hass = intent_obj.hass diff --git a/mypy.ini b/mypy.ini index 99c7749c80d..4c6b9a4ac6a 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3272,6 +3272,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.todo.*] +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.tolo.*] check_untyped_defs = true disallow_incomplete_defs = true