diff --git a/homeassistant/components/tuya/humidifier.py b/homeassistant/components/tuya/humidifier.py index 36fcf8f52aa..f8fd9237ffc 100644 --- a/homeassistant/components/tuya/humidifier.py +++ b/homeassistant/components/tuya/humidifier.py @@ -190,6 +190,6 @@ class TuyaHumidifierEntity(TuyaEntity, HumidifierEntity): ] ) - def set_mode(self, mode): + def set_mode(self, mode: str) -> None: """Set new target preset mode.""" self._send_command([{"code": DPCode.MODE, "value": mode}]) diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 57dff037f56..45a3e41f91a 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -1753,42 +1753,51 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="available_modes", return_type=["list[str]", None], + mandatory=True, ), TypeHintMatch( function_name="device_class", return_type=["HumidifierDeviceClass", None], + mandatory=True, ), TypeHintMatch( function_name="min_humidity", return_type=["float"], + mandatory=True, ), TypeHintMatch( function_name="max_humidity", return_type=["float"], + mandatory=True, ), TypeHintMatch( function_name="mode", return_type=["str", None], + mandatory=True, ), TypeHintMatch( function_name="supported_features", return_type="HumidifierEntityFeature", + mandatory=True, ), TypeHintMatch( function_name="target_humidity", return_type=["float", None], + mandatory=True, ), TypeHintMatch( function_name="set_humidity", arg_types={1: "int"}, return_type=None, has_async_counterpart=True, + mandatory=True, ), TypeHintMatch( function_name="set_mode", arg_types={1: "str"}, return_type=None, has_async_counterpart=True, + mandatory=True, ), ], ),