mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Mark light methods and properties as mandatory in pylint plugin (#145510)
This commit is contained in:
@@ -1816,6 +1816,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
TypeHintMatch(
|
||||
function_name="color_mode",
|
||||
return_type=["ColorMode", "str", None],
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="hs_color",
|
||||
@@ -1828,26 +1829,32 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
TypeHintMatch(
|
||||
function_name="rgb_color",
|
||||
return_type=["tuple[int, int, int]", None],
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="rgbw_color",
|
||||
return_type=["tuple[int, int, int, int]", None],
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="rgbww_color",
|
||||
return_type=["tuple[int, int, int, int, int]", None],
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="color_temp",
|
||||
return_type=["int", None],
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="min_mireds",
|
||||
return_type="int",
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="max_mireds",
|
||||
return_type="int",
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="effect_list",
|
||||
@@ -1864,10 +1871,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
TypeHintMatch(
|
||||
function_name="supported_color_modes",
|
||||
return_type=["set[ColorMode]", "set[str]", None],
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="supported_features",
|
||||
return_type="LightEntityFeature",
|
||||
mandatory=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="turn_on",
|
||||
@@ -1892,6 +1901,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
kwargs_type="Any",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
mandatory=True,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user