mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 02:38:10 +02:00
Fix pylint plugin for vacuum entity (#146467)
* Clean out legacy VacuumEntity from pylint plugins * Fix * Fix pylint for vacuum * More fixes * Revert partial * Add back state
This commit is contained in:
@ -70,7 +70,7 @@ _MODULES: dict[str, set[str]] = {
|
||||
"todo": {"TodoListEntity"},
|
||||
"tts": {"TextToSpeechEntity"},
|
||||
"update": {"UpdateEntity", "UpdateEntityDescription"},
|
||||
"vacuum": {"StateVacuumEntity", "VacuumEntity", "VacuumEntityDescription"},
|
||||
"vacuum": {"StateVacuumEntity", "VacuumEntityDescription"},
|
||||
"wake_word": {"WakeWordDetectionEntity"},
|
||||
"water_heater": {"WaterHeaterEntity"},
|
||||
"weather": {
|
||||
|
@ -2789,12 +2789,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
matches=_RESTORE_ENTITY_MATCH,
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="ToggleEntity",
|
||||
matches=_TOGGLE_ENTITY_MATCH,
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="_BaseVacuum",
|
||||
base_class="StateVacuumEntity",
|
||||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="state",
|
||||
return_type=["str", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="battery_level",
|
||||
return_type=["int", None],
|
||||
@ -2821,6 +2821,16 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="start",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="pause",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="return_to_base",
|
||||
kwargs_type="Any",
|
||||
@ -2860,63 +2870,6 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||
),
|
||||
],
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="VacuumEntity",
|
||||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="status",
|
||||
return_type=["str", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="start_pause",
|
||||
kwargs_type="Any",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="async_pause",
|
||||
return_type=None,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="async_start",
|
||||
return_type=None,
|
||||
),
|
||||
],
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="StateVacuumEntity",
|
||||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="state",
|
||||
return_type=["str", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="start",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="pause",
|
||||
return_type=None,
|
||||
has_async_counterpart=True,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="async_turn_on",
|
||||
kwargs_type="Any",
|
||||
return_type=None,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="async_turn_off",
|
||||
kwargs_type="Any",
|
||||
return_type=None,
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="async_toggle",
|
||||
kwargs_type="Any",
|
||||
return_type=None,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
"water_heater": [
|
||||
ClassTypeHintMatch(
|
||||
|
Reference in New Issue
Block a user