Add RestoreSensor to sensor checks in pylint (#76916)
This commit is contained in:
parent
fc6c66fe6c
commit
27b5ebb9d3
1 changed files with 17 additions and 0 deletions
|
@ -1949,6 +1949,10 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||
base_class="Entity",
|
||||
matches=_ENTITY_MATCH,
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="RestoreEntity",
|
||||
matches=_RESTORE_ENTITY_MATCH,
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="SensorEntity",
|
||||
matches=[
|
||||
|
@ -1983,6 +1987,19 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||
),
|
||||
],
|
||||
),
|
||||
ClassTypeHintMatch(
|
||||
base_class="RestoreSensor",
|
||||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="extra_restore_state_data",
|
||||
return_type="SensorExtraStoredData",
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="async_get_last_sensor_data",
|
||||
return_type=["SensorExtraStoredData", None],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
"siren": [
|
||||
ClassTypeHintMatch(
|
||||
|
|
Loading…
Add table
Reference in a new issue