mirror of
https://github.com/home-assistant/core.git
synced 2025-07-04 03:47:09 +00:00
Add vacuum activity to pylint type hints check (#147162)
This commit is contained in:
parent
dfa3fddd35
commit
a7de947f00
@ -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],
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user