From 22c1ddef713754b56d8cfa7ee53bdf0898faa592 Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Wed, 23 Aug 2023 12:45:49 -0500 Subject: [PATCH] Enable strict typing for ipp (#98792) enable strict typing for ipp --- .strict-typing | 1 + homeassistant/components/ipp/config_flow.py | 4 ++-- mypy.ini | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.strict-typing b/.strict-typing index 5ecdc54826b..41138c812ec 100644 --- a/.strict-typing +++ b/.strict-typing @@ -183,6 +183,7 @@ homeassistant.components.imap.* homeassistant.components.input_button.* homeassistant.components.input_select.* homeassistant.components.integration.* +homeassistant.components.ipp.* homeassistant.components.iqvia.* homeassistant.components.isy994.* homeassistant.components.jellyfin.* diff --git a/homeassistant/components/ipp/config_flow.py b/homeassistant/components/ipp/config_flow.py index a00190eebce..8d1da6eca91 100644 --- a/homeassistant/components/ipp/config_flow.py +++ b/homeassistant/components/ipp/config_flow.py @@ -59,9 +59,9 @@ class IPPFlowHandler(ConfigFlow, domain=DOMAIN): VERSION = 1 - def __init__(self): + def __init__(self) -> None: """Set up the instance.""" - self.discovery_info = {} + self.discovery_info: dict[str, Any] = {} async def async_step_user( self, user_input: dict[str, Any] | None = None diff --git a/mypy.ini b/mypy.ini index 883a5ec2f26..a4bf83dbf27 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1592,6 +1592,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.ipp.*] +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.iqvia.*] check_untyped_defs = true disallow_incomplete_defs = true