mirror of
https://github.com/home-assistant/core.git
synced 2025-06-24 09:01:55 +02:00
Add vacuum activity to pylint type hints check (#147162)
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user