mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Mark humidifier methods and properties as mandatory in pylint plugin (#145507)
This commit is contained in:
parent
4747de4703
commit
cbeefdaf26
@ -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."""
|
"""Set new target preset mode."""
|
||||||
self._send_command([{"code": DPCode.MODE, "value": mode}])
|
self._send_command([{"code": DPCode.MODE, "value": mode}])
|
||||||
|
@ -1753,42 +1753,51 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="available_modes",
|
function_name="available_modes",
|
||||||
return_type=["list[str]", None],
|
return_type=["list[str]", None],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="device_class",
|
function_name="device_class",
|
||||||
return_type=["HumidifierDeviceClass", None],
|
return_type=["HumidifierDeviceClass", None],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="min_humidity",
|
function_name="min_humidity",
|
||||||
return_type=["float"],
|
return_type=["float"],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="max_humidity",
|
function_name="max_humidity",
|
||||||
return_type=["float"],
|
return_type=["float"],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="mode",
|
function_name="mode",
|
||||||
return_type=["str", None],
|
return_type=["str", None],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_features",
|
function_name="supported_features",
|
||||||
return_type="HumidifierEntityFeature",
|
return_type="HumidifierEntityFeature",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="target_humidity",
|
function_name="target_humidity",
|
||||||
return_type=["float", None],
|
return_type=["float", None],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="set_humidity",
|
function_name="set_humidity",
|
||||||
arg_types={1: "int"},
|
arg_types={1: "int"},
|
||||||
return_type=None,
|
return_type=None,
|
||||||
has_async_counterpart=True,
|
has_async_counterpart=True,
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="set_mode",
|
function_name="set_mode",
|
||||||
arg_types={1: "str"},
|
arg_types={1: "str"},
|
||||||
return_type=None,
|
return_type=None,
|
||||||
has_async_counterpart=True,
|
has_async_counterpart=True,
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user