Add vacuum activity to pylint type hints check (#147162)

This commit is contained in:
G Johansson
2025-06-23 19:12:18 +02:00
committed by GitHub
parent dfa3fddd35
commit a7de947f00
2 changed files with 8 additions and 0 deletions

View File

@ -2795,6 +2795,10 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
function_name="state",
return_type=["str", None],
),
TypeHintMatch(
function_name="activity",
return_type=["VacuumActivity", None],
),
TypeHintMatch(
function_name="battery_level",
return_type=["int", None],

View File

@ -1167,6 +1167,10 @@ def test_vacuum_entity(linter: UnittestLinter, type_hint_checker: BaseChecker) -
class MyVacuum( #@
StateVacuumEntity
):
@property
def activity(self) -> VacuumActivity | None:
pass
def send_command(
self,
command: str,