mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Add siren checks to pylint plugin (#76460)
This commit is contained in:
parent
b19ace9124
commit
bcdf880364
@ -1477,6 +1477,58 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
"select": [
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="Entity",
|
||||||
|
matches=_ENTITY_MATCH,
|
||||||
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="SelectEntity",
|
||||||
|
matches=[
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="capability_attributes",
|
||||||
|
return_type="dict[str, Any]",
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="options",
|
||||||
|
return_type="list[str]",
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="current_option",
|
||||||
|
return_type=["str", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="select_option",
|
||||||
|
return_type=None,
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="select_option",
|
||||||
|
arg_types={1: "str"},
|
||||||
|
return_type=None,
|
||||||
|
has_async_counterpart=True,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
"siren": [
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="Entity",
|
||||||
|
matches=_ENTITY_MATCH,
|
||||||
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="ToggleEntity",
|
||||||
|
matches=_TOGGLE_ENTITY_MATCH,
|
||||||
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="SirenEntity",
|
||||||
|
matches=[
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="available_tones",
|
||||||
|
return_type=["dict[int, str]", "list[int | str]", None],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user