Add vacuum activity to pylint type hints check

This commit is contained in:
G Johansson
2025-06-19 20:02:43 +00:00
parent 2c13c70e12
commit 80bd3c83cf
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,