diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index bc1af17f97a..bbc0c4b7972 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -1008,18 +1008,22 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="entity_picture", return_type="str", + mandatory=True, ), TypeHintMatch( function_name="supported_features", return_type="CameraEntityFeature", + mandatory=True, ), TypeHintMatch( function_name="is_recording", return_type="bool", + mandatory=True, ), TypeHintMatch( function_name="is_streaming", return_type="bool", + mandatory=True, ), TypeHintMatch( function_name="brand", @@ -1028,6 +1032,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="motion_detection_enabled", return_type="bool", + mandatory=True, ), TypeHintMatch( function_name="model", @@ -1036,6 +1041,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="frame_interval", return_type="float", + mandatory=True, ), TypeHintMatch( function_name="frontend_stream_type", @@ -1044,6 +1050,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="available", return_type="bool", + mandatory=True, ), TypeHintMatch( function_name="async_create_stream", @@ -1076,6 +1083,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 2: "float", }, return_type="StreamResponse", + mandatory=True, ), TypeHintMatch( function_name="handle_async_mjpeg_stream", @@ -1087,26 +1095,31 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="is_on", return_type="bool", + mandatory=True, ), TypeHintMatch( function_name="turn_off", return_type=None, has_async_counterpart=True, + mandatory=True, ), TypeHintMatch( function_name="turn_on", return_type=None, has_async_counterpart=True, + mandatory=True, ), TypeHintMatch( function_name="enable_motion_detection", return_type=None, has_async_counterpart=True, + mandatory=True, ), TypeHintMatch( function_name="disable_motion_detection", return_type=None, has_async_counterpart=True, + mandatory=True, ), TypeHintMatch( function_name="async_handle_async_webrtc_offer", @@ -1116,6 +1129,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 3: "WebRTCSendMessage", }, return_type=None, + mandatory=True, ), TypeHintMatch( function_name="async_on_webrtc_candidate", @@ -1124,6 +1138,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 2: "RTCIceCandidateInit", }, return_type=None, + mandatory=True, ), TypeHintMatch( function_name="close_webrtc_session", @@ -1131,10 +1146,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 1: "str", }, return_type=None, + mandatory=True, ), TypeHintMatch( function_name="_async_get_webrtc_client_configuration", return_type="WebRTCClientConfiguration", + mandatory=True, ), ], ),