mirror of
https://github.com/home-assistant/core.git
synced 2025-06-24 17:11:53 +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",
|
function_name="state",
|
||||||
return_type=["str", None],
|
return_type=["str", None],
|
||||||
),
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="activity",
|
||||||
|
return_type=["VacuumActivity", None],
|
||||||
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="battery_level",
|
function_name="battery_level",
|
||||||
return_type=["int", None],
|
return_type=["int", None],
|
||||||
|
@ -1167,6 +1167,10 @@ def test_vacuum_entity(linter: UnittestLinter, type_hint_checker: BaseChecker) -
|
|||||||
class MyVacuum( #@
|
class MyVacuum( #@
|
||||||
StateVacuumEntity
|
StateVacuumEntity
|
||||||
):
|
):
|
||||||
|
@property
|
||||||
|
def activity(self) -> VacuumActivity | None:
|
||||||
|
pass
|
||||||
|
|
||||||
def send_command(
|
def send_command(
|
||||||
self,
|
self,
|
||||||
command: str,
|
command: str,
|
||||||
|
Reference in New Issue
Block a user