mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Mark fan methods and properties as mandatory in pylint plugin (#145311)
This commit is contained in:
parent
01b8f97201
commit
088cfc3576
@ -1575,10 +1575,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="speed_count",
|
function_name="speed_count",
|
||||||
return_type="int",
|
return_type="int",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="percentage_step",
|
function_name="percentage_step",
|
||||||
return_type="float",
|
return_type="float",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="current_direction",
|
function_name="current_direction",
|
||||||
@ -1599,24 +1601,28 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_features",
|
function_name="supported_features",
|
||||||
return_type="FanEntityFeature",
|
return_type="FanEntityFeature",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="set_percentage",
|
function_name="set_percentage",
|
||||||
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_preset_mode",
|
function_name="set_preset_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,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="set_direction",
|
function_name="set_direction",
|
||||||
arg_types={1: "str"},
|
arg_types={1: "str"},
|
||||||
return_type=None,
|
return_type=None,
|
||||||
has_async_counterpart=True,
|
has_async_counterpart=True,
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="turn_on",
|
function_name="turn_on",
|
||||||
@ -1627,12 +1633,14 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
kwargs_type="Any",
|
kwargs_type="Any",
|
||||||
return_type=None,
|
return_type=None,
|
||||||
has_async_counterpart=True,
|
has_async_counterpart=True,
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="oscillate",
|
function_name="oscillate",
|
||||||
arg_types={1: "bool"},
|
arg_types={1: "bool"},
|
||||||
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